0% found this document useful (0 votes)
185 views10 pages

SIT787 Assignment 1

The document presents a mathematics assignment focused on functions, logarithms, and derivatives, detailing the process of finding domains, roots, intercepts, and stationary points of various functions. It includes calculations for the first and second derivatives, verification of roots, and classification of stationary points using the second derivative test. The assignment concludes with an analysis of the function's behavior based on sign tables for increasing and decreasing intervals.

Uploaded by

Qiao Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
185 views10 pages

SIT787 Assignment 1

The document presents a mathematics assignment focused on functions, logarithms, and derivatives, detailing the process of finding domains, roots, intercepts, and stationary points of various functions. It includes calculations for the first and second derivatives, verification of roots, and classification of stationary points using the second derivative test. The assignment concludes with an analysis of the function's behavior based on sign tables for increasing and decreasing intervals.

Uploaded by

Qiao Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

SIT 787 Mathematics for AI

Assignment 1

Student Name: Jason Wang; Student ID: 224566126

Solution
𝑥
The domain of 𝑓(𝑥) consists of all values of x such that ≥ 0, because the square root of a
log1 (𝑥)
2
negative number is not defined (as a real umber).
𝑥
Find roots of all the factors for :
log1 (𝑥)
2
x=0
log 1 (𝑥) = 0 → x=1
2

Draw the sign table:

𝑥
From the sign table, we identify > 0 on the interval (0, 1).
log1 (𝑥)
2

The function is not defined on the interval (-∞, 0], since log 1 (𝑥) has domain (0, +∞).
2
𝑥
The function is not defined at x = 1, since log 1 (1) = 0 and the denominator of can not be
2 log1 (𝑥)
2

zero.

Thus the domain of 𝑓(𝑥) is the interval (0,1).

1
Solution

Apply rules of logarithms


𝑥 2 − 3𝑥 + 2
ln(𝑥 2 − 3𝑥 + 2) − ln(𝑥 − 1) = ln( )
𝑥−1

To solve ln(𝑥 2 − 3𝑥 + 2) − ln(𝑥 − 1) = 0

𝑥 2 −3𝑥+2
→ To solve ln( )=0
𝑥−1

𝑥 2 −3𝑥+2
→ =1
𝑥−1

→ 𝑥 2 − 3𝑥 + 2 = 𝑥 − 1

→ 𝑥 2 − 4𝑥 + 3 = 0

→ (𝑥 − 3)(𝑥 − 1) = 0

→ 𝑥 = 3 ,𝑥 = 1

Verify the roots by plugging them into 𝑓(𝑥) = ln(𝑥2 − 3𝑥 + 2) − ln(𝑥 − 1)

Plug in 𝑥 = 3, 𝑓(3) = ln(32 − 3 ∙ 3 + 2) − ln(3 − 1) = ln 2 − ln 2 = 0 → 𝑥 = 3 is verified.


Plug in 𝑥 = 1, 𝑓(1) = ln(12 − 1 ∙ 3 + 2) − ln(1 − 1) = ln 0 − ln 0 → 𝑥 = 1 is not verified since the
domain of logarithm function is (0, +∞).

Thus the root for 𝑓(𝑥) = 0 is 𝑥 = 3.

Solution

The function has no undefined points or domain constraints, since the denominator 𝑥 2 + 1 ≠
0 for 𝑥 ∈ 𝑅.

Therefore, the domain of 𝑓(𝑥) is (-∞, +∞).

2
Solution

For y-intercept: put x = 0


|0| + 2
𝑓(0) = =2
02 + 1
Thus y-intercept is (0, 2)

For x-intercept: put y = 0


|𝑥| + 2
𝑓(𝑥) = =0
𝑥2 + 1
There is no solution for 𝑥 ∈ 𝑅, since there is no solution to solve |𝑥| + 2 = 0 or 𝑥 2 + 1 ≠ 0 .
Thus there is no x-intercept.

Solution

𝑥+2
if 𝑥 ≥ 0
𝑥2 + 1
𝑓(𝑥) =
−𝑥 + 2
if 𝑥 < 0
{ 𝑥2 + 1

Solution

To find stationary points, we need to find the first derivative of the piecewise-defined function, then
we check when the derivative is zero or doesn’t exist.

𝐈𝐟 𝒙 > 𝟎

𝑑 𝑑
(𝑥 2 + 1) (𝑥 + 2) − (𝑥 + 2) (𝑥 2 + 1) (𝑥 2 + 1) − 2𝑥(𝑥 + 2) −𝑥 2 − 4𝑥 + 1
𝑓 ′ (𝑥)
= 𝑑𝑥 𝑑𝑥 = = (I)
(𝑥 2 + 1)2 (𝑥 2 + 1)2 (𝑥 2 + 1)2
−𝑥 2 −4𝑥+1
Solve 𝑓 ′ (𝑥) = (𝑥 2 +1)2
= 0

→ Solve −𝑥 2 − 4𝑥 + 1 = 0, since (𝑥 2 + 1)2 ≠ 0


−(−4)±√(−4)2 −4(−1)(1) −4±√20
→ 𝑥= 2(−1)
= 2
= −2 ± √5

3
Thus 𝑥 = √5 − 2, since 𝑥 > 0
(√5−2)+2 √5 √5 √5 √5 (5+2√5) √5+2
𝑓(√5 − 2) = 2 = 4+5−4√5+1 = = 2(5−2√5) = 2(5−2√5) =
(√5−2) +1 10−4√5 (5+2√5) 2

𝐈𝐟 𝒙 < 𝟎

𝑑 𝑑
(𝑥 2 + 1) (−𝑥 + 2) − (−𝑥 + 2) (𝑥 2 + 1) −(𝑥 2 + 1) − 2𝑥(−𝑥 + 2) 𝑥 2 − 4𝑥 − 1
𝑓 ′ (𝑥)
= 𝑑𝑥 𝑑𝑥 = = (II)
(𝑥 2 + 1)2 (𝑥 2 + 1)2 (𝑥 2 + 1)2

𝑥 2 −4𝑥−1
Solve 𝑓 ′ (𝑥) = (𝑥 2 +1)2
= 0

→ Solve 𝑥 2 − 4𝑥 − 1 = 0, since (𝑥 2 + 1)2 ≠ 0


−(−4)±√(−4)2 −4(1)(−1) 4±√20
→ 𝑥= = = 2 ± √5
2(1) 2

Thus 𝑥 = 2 − √5, since 𝑥 < 0.


−(2−√5)+2 √5 √5 √5 √5 (5+2√5) √5+2
𝑓(2 − √5) = = 4+5−4√5+1 = = 2(5−2√5) = 2(5−2√5) =
(2−√5)2 +1 10−4√5 (5+2√5) 2

𝐀𝐭 𝒙 = 𝟎
−02 −4(0)+1
From the rule (I), 𝑓 ′ (0) = (02 +1)2
= 1
02 −4(0)−1
From the rule (II), 𝑓 ′ (0) = (02 +1)2
= −1

Therefore, the function is not differentiable at x = 0.


0+2
𝑓(0) = (0)2 +1 = 2

Thus the stationary points are:


√5+2
( √5 − 2 , ) ≈ ( 0.24 , 2.12) 𝑖𝑓 𝑥 > 0
2

(0, 2) 𝑖𝑓 𝑥 = 0
√5+2
( 2 − √5 , ) ≈ ( −0.24 , 2.12) 𝑖𝑓 𝑥 < 0
2

Solution

We use the second derivative test to classify the stationary points.

𝐈𝐟 𝒙 > 𝟎

4
𝑑 𝑑
(𝑥 2 + 1)2 (−𝑥 2 − 4𝑥 + 1) − (−𝑥 2 − 4𝑥 + 1) (𝑥 2 + 1)2
𝑓 ′′ (𝑥)
= 𝑑𝑥 𝑑𝑥
((𝑥 2 + 1)2 )2

(𝑥 2 +1)2 (−2𝑥−4)−(−𝑥 2 −4𝑥+1)(4𝑥 3 +4𝑥)


= (𝑥 2 +1)4

(𝑥 2 + 1)(−2𝑥 − 4) − (−𝑥 2 − 4𝑥 + 1)(4𝑥)


=
(𝑥 2 + 1)3
2𝑥 3 + 12𝑥 2 − 6𝑥 − 4
=
(𝑥 2 + 1)3

2(0.24)3 +12(0.24)2 −6(0.24)−4


At x = 0.24, 𝑓 ′′ (0.24) = ((0.24)2 +1)3
= - 4.01 < 0

Therefore ( 0.24 , 2.12) is a local maximum point.

𝐈𝐟 𝒙 < 𝟎

𝑑 2 𝑑
(𝑥 2 + 1)2 (𝑥 − 4𝑥 − 1) − (𝑥 2 − 4𝑥 − 1) (𝑥 2 + 1)2
𝑓 ′′ (𝑥)
= 𝑑𝑥 𝑑𝑥
((𝑥 2 + 1)2 )2

(𝑥 2 + 1)2 (2𝑥 − 4) − (𝑥 2 − 4𝑥 − 1)(4𝑥 3 + 4𝑥)


=
(𝑥 2 + 1)4
(𝑥 2 + 1)(2𝑥 − 4) − (𝑥 2 − 4𝑥 − 1)(4𝑥)
=
(𝑥 2 + 1)3

−2𝑥 3 + 12𝑥 2 + 6𝑥 − 4
=
(𝑥 2 + 1)3
−2(−0.24)3 +12(0.24)2 +6(0.24)−4
At x = −0.24, 𝑓 ′′ (−0.24) = ((−0.24)2 +1)3
= - 4.01 < 0

Therefore (−0.24 , 2.12) is a local maximum point.

𝐀𝐭 𝒙 = 𝟎, the function is not differentiable. (0, 2) is a local minimum point.

Solution

We use the sign table of the first derivative to see when the first derivative is positive or negative,
which means the function is increasing or decreasing.

We have the first derivative of the function based on question 2. (iv):

5
−𝑥 2 − 4𝑥 + 1
if 𝑥 > 0
(𝑥 2 + 1)2
𝑓′(𝑥) =
𝑥 2 − 4𝑥 − 1
if 𝑥 < 0
{ (𝑥 2 + 1)2

The function is not differentiable at x = 0.

Draw the sign table if 𝑥 > 0

Draw the sign table if 𝑥 < 0

Based on the sign table, the function is increasing on interval (0, √5 − 2 ) and (−∞, 2 − √5), and
the function is decreasing on interval (√5 − 2 , +∞) and (2 − √5, 0).

Solution

We have the second derivative of the function based on question 2. (v):

2𝑥 3 + 12𝑥 2 − 6𝑥 − 4
if 𝑥 > 0
(𝑥 2 + 1)3
𝑓′′(𝑥) =
−2𝑥3 + 12𝑥2 + 6𝑥 − 4
if 𝑥 < 0
{ ( 𝑥 2 + 1) 3

The function is not differentiable at x = 0.

We solve for 𝑓′′(𝑥) = 0 and draw sign tables to find inflection points.

6
𝐈𝐟 𝒙 > 𝟎

2𝑥 3 +12𝑥 2 −6𝑥−4
Solve 𝑓 ′ ′(𝑥) = (𝑥 2 +1)3
= 0

→ Solve 2𝑥3 + 12𝑥2 − 6𝑥 − 4 = 0, since (𝑥 2 + 1)3 ≠ 0


→ Solve 𝑥3 + 6𝑥2 − 3𝑥 − 2 = 0 using trial and error method
x 𝑥 3 + 6𝑥 2 − 3𝑥 − 2
1.00 2.00
0.95 1.42
0.90 0.89
0.85 0.40
0.83 0.17
0.81 0.00

→ 𝑥 ≈ 0.81

Apply long division

𝑥 3 +6𝑥 2 −3𝑥−2
≈ 𝑥 2 + 6.81𝑥 + 2.52
𝑥−0.81

Solve 𝑥 2 + 6.81𝑥 + 2.52 = 0

−6.81 ± √(6.81)2 − 4(1)(2.52) −6.81 ± √36.29


𝑥= =
2(1) 2

→ 𝑥 ≈ −0.39, 𝑥 ≈ −6.42 , not verified since 𝑥 > 0

Draw the sign table if 𝑥 > 0

0.81 + 2
𝑓(0.81) = ≈ 1.70
(0.81)2 + 1

The inflection point is (0.81, 1.70) if 𝑥 > 0

𝐈𝐟 𝒙 < 𝟎

−2𝑥 3 +12𝑥 2 +6𝑥−4


Solve 𝑓 ′ ′(𝑥) = (𝑥 2 +1)3
= 0

7
→ Solve −2𝑥 3 + 12𝑥 2 + 6𝑥 − 4 = 0, since (𝑥 2 + 1)3 ≠ 0
→ Solve −𝑥3 + 6𝑥2 + 3𝑥 − 2 = 0 using trial and error method
x −𝑥 3 + 6𝑥 2 + 3𝑥 − 2
-1.00 2.00
-0.95 1.42
-0.90 0.89
-0.85 0.40
-0.83 0.17
-0.81 0.00

→ 𝑥 ≈ − 0.81

Apply long division

−𝑥 3 +6𝑥 2 +3𝑥−2
≈ −𝑥 2 + 6.81𝑥 − 2.52
𝑥+0.81

Solve −𝑥 2 + 6.81𝑥 − 2.52 = 0

−6.81 ± √(6.81)2 − 4(−1)(−2.52) 6.81 ± √36.29


𝑥= =
2(−1) 2

→ 𝑥 ≈ 0.39, 𝑥 ≈ 6.42 , not verified since 𝑥 < 0

Draw the sign table if 𝑥 < 0

0.81 + 2
𝑓(−0.81) = ≈ 1.70
(−0.81)2 + 1
The inflection point is (-0.81, 1.70) if 𝑥 < 0

Based on the sign table, the function is concave on interval (0, 0.81) and (−0.81, 0) , and the
function is convex on interval (0.81, +∞) and (−∞, −0.81).

8
Solution

Information for sketching the function based on step (i) to (vii) as follows:
Domain: (-∞, +∞).
y-intercept: (0,2); no x-intercept
Local maximum points: (−0.24 , 2.12) , (0.24 , 2.12)
Local minimum point: (0,2)
Inflection points: (-0.81, 1.70), (0.81, 1.70)
The function increases on interval (0,0.24 ) and (−∞, −0.24), and decreases on interval
(0.24 , +∞) and (−0.24,0).
The function is concave on interval (0, 0.81) and (−0.81, 0), and convex on interval (0.81, +∞)
and (−∞, −0.81).

Answer

I selected question 2, which is about function and optimization.

9
Functions are widely utilized in AI to categorize information, detect patterns and make
predictions (Jeevanandam, 2023). For example, machine learning adopts linear regression function;
neural networks consist of many interconnected functions.

Many AI tasks can be transformed as optimization problems. Optimization techniques are often used
for efficient training, fine-tuning and improvement of AI models. A commonly-used optimization
algorithm is gradient descent, which minimizes errors between predicted and actual results to train
machine learning models (IBM, 2024). Optimization also enables other important AI techniques such
as backpropagation, optimal control and regularization.

References:

IBM. (2024). What is gradient descent. https://www.ibm.com/topics/gradient-descent

Jeevanandam, N. (2023, December 22). Mathematics and its essential role in AI. INDIAai.
https://indiaai.gov.in/article/mathematics-and-its-essential-role-in-ai

10

You might also like