Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

lOMoARcPSD|33093608

Cal1 211 CC15 Group 5 - Bài tập lớn Giải tích 1

giải tích 1 (Trường Đại học Công nghệ Thành phố Hồ Chí Minh)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)
lOMoARcPSD|33093608

GROUP 5 - Calculus Report for Topic 3: Differentiation Rules

VIETNAM NATIONAL UNIVERSITY - HO CHI MINH

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY

School year 2021-2022 - Semester 1

PROJECT REPORT

CLASS:

MT1003_CALCULUS 1
− Teacher: Dr. Phan Thành An
− Assistant teacher: Ms. Vũ Thanh Châu

Group 5 - Class CC15

Members:

No. Full name Student’s ID Task


Differentiation Rules

1 Trần Thị Phương Trâm 2153910 Section 3.1, Exercise 50


Topic 3:

2 Lê Mai Phương 2153708 Section 3.5, Exercise 33

3 Tăng Tuấn Đạt 2152512 Section 3.10, Exercise 32

Page | 0

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

GROUP 5 - Calculus Report for Topic 3: Differentiation Rules

TABLE OF CONTENTS

SECTION 1: Trần Thị Phương Trâm ....................................................... 2

I. Theories summary .................................................................................................... 2


II. Solution details ......................................................................................................... 3
III. Coding details .......................................................................................................... 5

SECTION 2: Lê Mai Phương ................................................................... 12

I. Theories summary .................................................................................................... 12


II. Solution details ......................................................................................................... 13
III. Coding details .......................................................................................................... 14

SECTION 3: Tăng Tuấn Đạt ..................................................................... 18

I. Theories summary .................................................................................................... 18


II. Solution details ......................................................................................................... 19
III. Coding details .......................................................................................................... 22

REFERENCES .............................................................................................................. 28

Page | 1

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

GROUP 5 - Calculus Report for Topic 3: Differentiation Rules

SECTION 1: Trần Thị Phương Trâm - Chapter 3.1, Exercise 50

TOPIC: Car tires need to be inflated properly because overinflation or underinflation can
cause premature treadware. The data in the table show tire life �㔿 (in thousands of miles) for a
certain type of tire at various pressures Ā (in lb/in2).

�㕷 26 28 31 35 38 42 45
�㕳 50 66 78 81 74 70 59
a) Use a graphing calculator or computer to model tire life with a quadratic function of the
pressure.

b) Use the model to estimate Ă�㔿/ĂĀ when Ā = 30 and when Ā = 40. What is the meaning
of derivative? What are the units? What is the significance of the signs of the derivative?

I. Theories summary:
− Definition of Tangentsa:

The tangent line to ÿ = Ą(þ) at (ÿ, Ą(ÿ)) is the line through (ÿ, Ą(ÿ)) whose slope is equal
to Ą9(ÿ), the derivative of Ą at ÿ:

ÿ 2 Ą(ÿ) = Ą9(ÿ)(þ 2 ÿ)

− Derivative of a Constant Functionb

�㕑
(ā ) = 0
�㕑ý

− The Power Rule (General Version)c: If ÿ is any real number, then

�㕑
(þ �㕛 ) = ÿþ �㕛−1
�㕑ý

− The Sum Rule: If Ą and ą are both differentiable, then

�㕑 �㕑 �㕑
[Ą (þ) + ą(þ)] = Ą (þ ) + ą(þ)
�㕑ý �㕑ý �㕑ý

− Increasing and Decreasing Functionsd:


o A function is called increasing on an interval I if

Page | 2

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

GROUP 5 - Calculus Report for Topic 3: Differentiation Rules

Ą(þ1 ) < Ą(þ2 ) whenever þ1 < þ2 in �㔼

o It is called decreasing on I if

Ą (þ1 ) > Ą (þ2 )whenever þ1 > þ2 in �㔼

II. Solution details:

For the reason that the data table is given with scattered values, it requires higher
mathematics method to find a second-degree polynomial of the pressure (which specifically
is <Non-linear least squares regression=) that neither be taught nor introduced in our
curriculum. Therefore, it would be better to reach for a technical approach towards this
problem.

The manual solution for exercise 50a below will use <Desmos= application as a
supporter to find the equation for the quadratic function.

a) Find the quadratic function by using Desmos:

− Step 1: Click the <+= sign then choose the (table) symbol

− Step 2: Fill the table with the data

Page | 3

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− Step 3: Enter to type the function ÿ2 ~ÿþ12 + Āþ1 + ā, the results is shown below with
both of its graph and value of the unknowns ÿ, Ā and ā

→ Result:

Therefore, the quadratic function of the pressure is:

ÿ = 20.2754þ12 + 19.7485þ1 2 273.5523

Or �㔿 = 20.2754Ā2 + 19.7485Ā 2 273.5523

b) �㔿 = ÿĀ2 + ĀĀ + ā (ýÿþ/ ÿ j 20.2754, Ā j 19.7485, ā j 2273,5523).

Use Differentiation rules to find derivative of �㔿(Ā).

�㕑�㔿 �㕑�㔿 �㕑�㔿 �㕑�㔿


(ÿĀ2 + ĀĀ + ā) = (ÿĀ2 ) + (ĀĀ) + (ā) = 2ÿ. Ā + Ā
�㕑�㕃 �㕑�㕃 �㕑�㕃 �㕑�㕃

o When Ā = 30:

⇒ �㔿′ (30) = 2ÿ. 30 + Ā = 2. (20.2754). 30 + 19.7485 j 3.22

o When Ā = 40:

⇒ �㔿′ (40) = 2ÿ. 40 + Ā = 2. (20.2754). 40 + 19.7485 j 22.29

Page | 4

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− The meaning of the derivative is that it is the instantaneous rate of change of tire life �㔿
with respect to pressure Ā.
�㕙�㕏
− The units are (þ/ĀÿýÿÿĂý ĀĄ þÿýăý) for �㔿 and ( ) for Ā.
ÿ�㕛2

− The significance of the signs of the derivatives that is:


�㕑�㔿
o When the derivative of tire life > 0, tire life is increasing;
�㕑�㕃
�㕑�㔿
o When the derivative of tire life < 0, tire life is decreasing.
�㕑�㕃

➢ Applications of the topic Differentiation Rules in general and in Section 3.1


exercise 50

The differentiation rules help us to evaluate the derivatives of some particular


functions, instead of using the general method of differentiation. The process of
differentiation or obtaining the derivative of a function has the significant property of
linearity e . The application of differentiation rules can be seen in calculating marginal
functions like revenue, costs and profit which expressed in a trending line, both linear or non-
linear; analyzing how demand changes with a change in price (rates of change); and finding
proportional changes.f

In the reporting section 3.1, exercise 50, the methods are used to estimate value at
given points, to know whether a variable is increasing or decreasing during the general trend.

III. Coding details (using Matlab)


1. Get the expression of the quadratic function:
− Step 1: Insert values of Ā (represents þ value) and �㔿 (represents ÿ value)
P=[26;28;31;35;38;42;45];
L = [50;66;78;81;74;70;59];

− Step 2: Use 8syms9 function to create symbolic function. We use 8quadr9 to express
the quadratic function
syms quadr

Page | 5

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− Step 3: Use the 8fit9 function to fit a polynomial to data. Specify a quadratic with the
string 'poly2'
quadr=fit(P,L,'poly2');
− Step 4: Run the codes to save variables in Workspace:

→ Result:

− Step 5: To view details of the function, type 8quadr9 in the Command Window

Therefore, we have the equation for the quadratic function as:

ÿ = 20.2754þ 2 + 19.75þ 2 273.6

2. Find the derivative, tangent lines:


− Step 1: Create symbolic variables x, f, derive (represents the derivative of
function Ą) by the function 8syms9. Then, insert function Ą and values for þ1 , þ2
syms x f deriv
f=-0.2754*x^2+19.75*x-273.6;
x1=30;

Page | 6

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

x2=40;

− Step 2: Use 8subs9 function to substitute respectively þ1 and þ2 into Ą(þ) to find ÿ1
and ÿ2
y1=subs(f,x,x1);
y2=subs(f,x,x2);

− Step 3: Use 8diff9 function to derivate Ą(þ)


deriv=diff(f,x)

− Step 4: Substitute þ1 and þ2 into the derivative function


slope1=subs(deriv,x,x1)
slope2=subs(deriv,x,x2)

− Step 5: Solve ÿ 2 ÿ0 = þ(þ 2 þ0 ) for ÿ1 , ÿ2 and assign respectively to the tangent


lines
tangent1=slope1*(x-x1)+y1
tangent2=slope2*(x-x2)+y2

Page | 7

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

3. Plot and design graph:


− Step 1: Plot all the needed functions (including the quadratic function and the given
data, tangent lines at þ1 and þ2 )
o hold on retains plots in the current axes so that new plots added to the axes
do not delete existing plots.
hold on
o plot(X,Y) creates a 2-D line plot of the data in ÿ versus the corresponding
values in þ.
plot(quadr,P,L,'*')
o ezplot(f,[min,max]) plots Ą over the specified range.
ezplot(tangent1,[26,46])
ezplot(tangent2,[26,46])

− Step 2: Design the graph appearance


o Name the graphs using 8legend9 command, use 'northeast' to display
the annotation table

Page | 8

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

legend({'data', 'tire life', 'tangent line at P=30',


'tangent line at P=40'}, 'location', 'northeast')
o hold off sets the hold state to off so that new plots added to the axes clear
existing plots and reset all axes properties.
hold off
o Set title for the graph and label the axes þ and ÿ
title('tire life in quadratic function of the pressure')
xlabel('pressure (lb/in^2)')
ylabel('tire life (thousands of miles)')
o Turn on grid
grid on

4. Run codes:

→ Result:

Page | 9

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− Check Command Window


Command Window automatically shows the information about the coded
functions, we see:
1613
o The variable 8slope19 has estimated Ă�㔿/ĂĀ when Ā = 30 to be = 3.226
500
1141
o The variable 8slope29 has estimated Ă�㔿/ĂĀ when Ā = 40 to be 2 =
500

22.282.

Page | 10

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

➢ Remark about the Matlab solution

Matlab has showed us itself as a functional program to help users carry out science
problems in general and mathematical problems in practical by using an effective and
appealing approach. Matlab provides with many of its amazing features so that we not only
can see an issue solved in a technical way, in which Matlab is a coding program, but also
observe it in two-dimension and three-dimension, support to an extent amount for engineers,
scientists and researchers. There is a benefit of saving time in terms of using Matlab as it
allows users to use the same code in order to answer different problems using same methods
of calculating, makes the work of analyzing data less heavy and time-consuming.

➢ Comparison between the detailed solution and the solution by code

Although Matlab includes a great number of functions, there are existing troubles
while doing this experiment as a beginner in this coding program. It is seem to cost less effort
in the this case when we solve the exercise manually, however, there is a capability that the
codes above is not at its best operation and yet Matlab stays a good impression in presenting
data with graphs in spite of its slightly complicated coding progress.

Page | 11

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

SECTION 2: Lê Mai Phương - Chapter 3.5, Exercise 33

TOPIC:

a) The curve with equation ÿ 2 = 5 × þ 4 2 þ 2 is called a kampyle of Eudoxus.

Find an equation of the tangent line to this curve at the point (1;2)

b) Illustrate part (a) by graphing the curve and the tangent line on a common screen.

I. Theories summary:
�㕑þ
þ= (þ = ÿ) is the slope of the tangent line at þ = ÿ.g
�㕑ý

− An equation of the tangent line to the curve at the point (ÿ ; Ā) is

ÿ 2 Ā = þ × ( þ 2 ÿ)

− The Power Rule: If n is a non-zero real number, then:

�㕑(ý �㕛 )
= ÿ × þ �㕛−1
�㕑ý

− Differentiation formulash

(Ą – ą)′ = Ą′ – ą′

(ā × Ą )′ = ā × Ą ′

− The Chain Rule for differentiationi

h(x) = f(g(x))

�㕑/(ý) �㕑(ÿ(Ā(ý)) �㕑(ÿ(Ā(ý)) �㕑(Ā(ý)


= = ×
�㕑ý �㕑ý �㕑(Ā(ý)) �㕑ý

/′(þ) = Ą ′(ą(þ)). ą ′(þ)

Page | 12

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

II. Solution details:


− To find an equation of the tangent line to the curve at the point (1; 2), we have to find
the slope there. The aim is to evaluate ÿ′ at þ = 1 and ÿ = 2.
− Different both sides the equation ÿ 2 = 5 × þ 4 2 þ 2 with respect to x

�㕑 �㕑
(ÿ 2 ) = (5þ 4 2 þ 2 )
�㕑ý �㕑ý

�㕑 �㕑 �㕑
(2ÿ) × (ÿ ) = 5 (þ 4 ) 2 (þ 2 )
�㕑ý �㕑ý �㕑ý

(2ÿ) × ÿ ′ = 5 × 4þ 3 2 2þ

20ý 3 −2ý 10ý 3 −ý


ÿ′ = =
2þ þ

− Then evaluate ÿ′ at þ = 1 and ÿ = 2

10 × (1)3 9
ÿ ′ (1; 2) = =
2 2

− Therefore, the equation of the tangent line to the curve represented by ÿ 2 = 5 × þ 4 2


þ 2 at (1; 2) is

9
ÿ22= × (þ 2 1)
2

9 5
ÿ= þ2
2 2

➢ Applications of the topic Differentiation Rules in general and in Section 3.5


exercise 33

Differentiation rules enable us to calculate with relative ease the derivatives of


polynomials, rational functions, algebraic functions, exponential and logarithmic functions,
and trigonometric and inverse trigonometric functions j . We then use these rules to solve
problems involving rates of change and the approximation of functions.

With regarding to exercise 33 in Section 3.5, it9s not easy to solve equation for
explicitly as a function of by hand. Fortunately, we don9t need to solve an equation for in
terms of in order to find the derivative of k . Instead we can use the method of implicit
Page | 13

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

differentiation. This consists of differentiating both sides of the equation with respect to þ
and then solving the resulting equation for ÿ9.

III. Coding details (Matlab):


− Step 1: Create symbolic variables þ, ÿ by the function 8syms’

− Step 2: Input 2 equations

F = y2

G = 5x4 - x2

− Step 3: Find the slope þ the tangent line to the curve with equation ÿ 2 = 5 × þ 4 2
þ 2 by the differentiate both sides and then take the right-hand side divide the left-
hand side.
Use the function 8diff9.

− Step 4: Find the equation of the tangent line to the curve at the point (1; 2).

Page | 14

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

Use the function 8subs(s, old, new)’ to substitute þ = 1 and ÿ = 2 to the slope
þ.

Then we have the tangent line ÿ1 = þ × (þ 2 1) + 2

→ Result:

Graphing the curve with equation þ�㗐 = Ā × ýÿ 2 ý�㗐 and tangent line to this
curve at the point (1;2)
− Step 1: Create figure window by the
function 8figure’.

− Step 2: Plot the implicit function


y2 = 5 × x4 2 x2 :
(y 2 2 5 × x 4 + x 2 = 0) on the
interval [26,6].
Use the function
8fimplicit(f, interval)’.

− Step 3: Use 8hold on’ to retain


current plot when adding new plot.

− Step 4: Input the interval to plot the tangent line ÿ1 .

− Step 5: Input the function of the tangent line ÿ1 that we have found before.

9 5
− Step 6: Plot the tangent line y1 = x 2
2 2

Page | 15

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

Use the function 8plot(x,y)’.

→ Result:

➢ Remark about the Matlab solution

Learning Matlab is accessible whether you are a novice or an expert, which may make us to
spend time searching the code that we need and understanding its usage properly. The Help
Center is always available to guide you with robust documentation, community answers, and
how-to videos. Using Matlab helps us solve our mathematical problems more flexibly and
accurately. Especially, Matlab provides us with the best support for faster and better graphs
of the complex or implicit functions than sketching them by hand.

➢ Comparison between the detailed solution and the solution by code

If we apply the proper and suitable code, the solution by code provides us the result of the
calculation faster and more accurate than the detailed solution that we do by ourselves.
Moreover, graphing the complicated functions correctly is absolutely possible if you we use
the code, which is quite difficult or may impossible for us to sketch it by hand. It is necessary

Page | 16

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

for engineers and students who are studying engineering to get acquaintance with using
coding program to solve the problems precisely.

Page | 17

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

SECTION 3: Tăng Tuấn Đạt - Chapter 3.10, Exercise 32

TOPIC: Let Ą (þ) = (þ 2 1)2 ą(þ) = ă 2 2þ

and /(þ) = 1 + ýÿ(1 2 2þ)

a) Find the linearizations of f, g, and h at ÿ = 0. What do you notice? How do you explain
what happened?

b) Graph f, g, and h and their linear approximations. For which function is the linear
approximation best? For which is it worst? Explain.

I. Theories summary:

It might be easy to calculate a value Ą(ÿ) of a function, but difficult (or even
impossible) to compute nearby values of f. For example, the function ÿ = 8ý , it is easy to
compute ÿ for þ = 1, but impossible to calculate for nearby values at þ = 1.05 or þ = 0.97.

We have seen that by zooming in a graph of a differentiable function at a certain point,


the graph looks more and more like its tangent line at that point. This is the basis of linear
approximation for finding approximate values of functions.

The tangent line at (ÿ, Ą(ÿ)) can be used to approximate the curve ÿ = Ą(þ) when þ
is near ÿ. An equation of this tangent line is

y = f(a) + f´(a)(x – a)

and the approximation f(x) ≈ f(a) + f´(a)(x – a)

The linearization of f at ÿ is written as:

L(x) = f(a) + f´(a)(x – a)

* Other theories used in this section for mathematical computation are the Derivative
rules and the Chain Rule:

Page | 18

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− The Chain Rule states that: if g is differentiable at x and f is differentiable at g(x), then
the composite function F(x) = f(g(x)) is differentiable at þ and �㔹´ is given by the
product:

�㔹´(þ) = Ą´(ą(þ)) . ą´(þ)

− Derivative rules such as:


o The Power Rule: if n is any real number, then
�㕑
(xn) = nxn-1
�㕑ý

o The Sum and Difference Rulesl:

�㕑 �㕑 �㕑
[Ą (þ) + ą(þ)] = Ą (þ ) + ą (þ )
�㕑ý �㕑ý �㕑ý

�㕑 �㕑 �㕑
[Ą (þ) 2 ą(þ)] = Ą (þ ) 2 ą(þ)
�㕑ý �㕑ý �㕑ý

o Derivative of the natural exponential functionm:

�㕑
(ă ý ) = ă ý
�㕑ý

o Derivative of the natural logarithmic functionn:

�㕑 1 �㕑�㕢
(ýÿÿ) = .
�㕑ý �㕢 �㕑ý

II. Solution details:

The given problem asks us to find the tangent line function (linearization) of three
separate functions at ÿ = 0. Afterwards, find which linearization of their respective functions
best and least approximate them among the three.

This question is an example for the practical uses of linearization, that is to find values
of functions nearby a certain þ = ÿ.

− Firstly, we find the functions respective derivatives and then tangent lines:
o Ą´(þ) = ((þ – 1)2 )´ = 2(þ – 1)(þ – 1)´ (Power Rule and the Chain Rule)

= 2(þ – 1)1 = 2(þ – 1)

Page | 19

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

�㔿1 (þ) = Ą (0) + Ą´(0)(þ – 0) = (0 – 1)2 + 2(0 – 1)þ = 22þ + 1

o ą´(þ) = (ă −2ý )´ = ă −2ý (22þ)´ (the Chain Rule)

= 22ă −2ý

�㔿2 (þ) = Ą(0) + Ą´(0)(þ – 0) = ă −2ý0 + 22ă −2ý0 þ = 22þ + 1

(1−2ý)´
o /´(þ) = (1 + ýÿ(1 – 2þ))´ = 0 + (Sum Rule and the Chain Rule)
1−2ý

2
= 2
1 − 2ý

22
�㔿3 (þ) = Ą (0) + Ą´(0)(þ – 0) = (1 + ln(1 – 0)) + þ = 22þ + 1
120

− While working out the linearization, it is noticed that �㔿1 , �㔿2 and �㔿3 have the same
equation �㔿(þ) = 22þ + 1. It could be explained that the three functions Ą, ą, / have
the same slope þ = 22 and ÿ = 1 at þ = 0 . This explanation is reasonable
because

þ = Ą´(0) = ą´(0) = /´(0) = 22

Ą(0) = ą(0) = /(0) = 1

(b) The graph of Ą, ą and / and their linear approximations could be drawn roughly by
connecting each coordinate (þ, ÿ) of that function for an interval of 0.1 like in the table
below

þ -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4


Ą 1.96 1.69 1.44 1.21 1 0.81 0.64 0.49 0.36
ą 2.23 1.82 1.49 1.22 1 0.82 0.67 0.55 0.45
/ 1.59 1.47 1.34 1.18 1 0.78 0.49 0.08 -0.61
�㔿 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2

Page | 20

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− To find out which function is approximated the best and the worst by the linearization,
we have a look at the graph in the interval near þ = 0 such as (20.2, 0.2).

It is clear to see that �㔿(þ) approximates the best for Ą(þ) as the blue line is closer to
the red line than any other ones. For the same logic, �㔿(þ) approximates the worst for /(þ) as
the black line is farther from the red line than any other ones.

➢ Application of the topic in general and in my topic:

Linearization is used in fields such as engineering, economics, ecology and mostly


physics. For instance, to work out a formula for the period of a pendulum, physics textbooks
obtain an expression involving ýÿÿ�㔃 and then replace ýÿÿ�㔃 by �㔃 (through linearization) with
the remark that ýÿÿ�㔃 is very close to θ if θ is not too large. This way, it is far easier to
calculate a pendulum9s period if θ is not too large. One more example is that, in paraxial (or
Gaussian) optics, both ýÿÿ�㔃 and āĀý�㔃 are replaced by their linearization ( ýÿÿ�㔃 j �㔃 and
āĀý�㔃 j 1). The results of calculations made with these approximations became the basic
theoretical tool used to design lenses.o

Page | 21

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

III. Coding details (Matlab):


1. Find the linearization of ÿ, Ā and ā

�㔿(þ) = Ą(ÿ) + Ą´(ÿ)(þ 2 ÿ)

And since ÿ = 0, we could rewrite �㔿(þ) as:

�㔿(þ) = Ą9(ÿ)þ + Ą(ÿ)

In which Ą9(ÿ) is the slope of the curve at ÿ = 0 and Ą(ÿ) is the curve ÿ-intercept. We
could find this using Matlab:

Ą(þ) = (þ – 1)2

ą(þ) = ă −2ý

/(þ) = 1 + ýÿ(1 – 2þ)

Page | 22

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− Step 1: Initializing all relevant x values


8x = (-0.5:0.000001:0)9 helps initialize all the þ from 20.5 to 0 with very
small interval 0.00001 which resembles a continuous curve
− Step 2: Input the required function
By changing what comes after <y == we can choose which function we want to
calculate for, such as Ą, ą or /.
− Step 3: Calculate the slope and y value at þ = 0
The code 8gradient(y,0.000001)9 calculates the rate of change (slope) of ÿ
with Ăþ = 0.000001, then assign the value to þ. It is crucial that Ăþ must be truly
small to find the instantaneous rate of change.
m(end) means the rate of change at the end of the interval (20.5, 0) which means at
þ = 0. It is the same for y(end), which is ÿ value at þ = 0.

Thus the slope is yp and the ÿ-intercept is ÿ0

As can be seen from the result of the running code, Ą, ą and / have the same slope
ÿā = 22 and ÿ0 = 1. That means they have the same linearization �㔿(þ) = 22þ + 1

2. Graph ÿ, Ā, ā and their linearization.

Code details:

%graph tangent line at a point

Page | 23

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

clc

clear

close all

x = (-1:0.000001:0);

f = (x – 1).^2;

g = exp(-2*x);

h = 1 + log(1 – 2*x);

L = -2*x + 1;

figure

hold on

plot(x, f, 8b-8)

plot(x, g, 8c-8)

plot(x, h, 8k-8)

plot(x, L, 8r-8)

grid on

legend(8f(x) = (x – 1).^29, 8g(x) = exp(-2*x)9, 8h(x) = 1 +


ln(1 – 2*x)9, 8L(x) = -2*x + 19, 8Location9, 8best9)

− Step 1: Initializing all relevant x values


− 8x = (-0.5:0.000001:0)9 helps initialize all the x from 20.5 to 0 with very
small interval 0.00001 which resembles a continuous curve.
Page | 24

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

− Step 2: List all required functions in term of þ


Those are Ą(þ), ą(þ), /(þ) and the linearization �㔿(þ).
− Step 3: Draw curves on a same plane
<hold on= makes sure that all graphs are visible on a same plane.
<plot= helps graphing the curve of Ą, ą, / and �㔿 with small alterations like 8b-8,
8c-8, … which change the colors of curve for easier observation.
<grid on= draws grid on the plane for easier observation
<legend= are descriptive labels of objects on the ÿþÿ plane

→ Result after running the code:

But it only gives us the left side of ÿ-axis

By changing <x = (-1:0.000001:0)= to <x = (0:0.000001:1)=, we would


have a graph of the right side of ÿ-axis

→ Result:

Page | 25

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

It looks like �㔿(þ) approximate the best for Ą(þ) and the worst for ą(þ). We can confirm
this by comparing �㔿(þ0 ) and the true value of functions at þ0 . Let9s draw a table of value in
small interval (20.2; 0.2) to determine which one is �㔿(þ) the best and worst approximation
of.

þ0 -0.2 -0.1 0 0.1 0.2


�㔿(þ) 1.40 1.20 1.00 0.80 0.60

Ą(þ) 1.44 1.21 1.00 0.81 0.64

ą(þ) 1.49 1.22 1.00 0.82 0.67


/(þ) 1.34 1.18 1.00 0.78 0.49

The table confirms that �㔿(þ) approximates Ą(þ) the best within accuracy of 0.4 .
Meanwhile, the worst is /(þ) as the accuracy fluctuate within 0.11, the highest among other
functions.

➢ Remarks about Matlab solution:

It takes time to learn the necessary code for using Matlab properly. Once you have learnt
them all, Matlab becomes your best tool to graph all the function on the same plane faster
and far more accurate than doing it by hand. About comparing which one does �㔿(þ)
Page | 26

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

approximate more accurate or worse, Matlab provides us real values to determine rather than
using our own observation alone, which might be wrong.

➢ Comparison between the detailed solution and the solution by code:

Having some knowledge about the topic beforehand, it is faster to solve by hand rather
than code and use Matlab. Though for harder questions, Matlab proves to be better as it
computes faster than human with higher accuracy (provided that the code is right), as it is
insusceptible to human error. Furthermore, there are functions that are nearly impossible to
solve by hand without the help of a mathematical program. For future research about same
topic, we can reuse the same code rather than solving it again, which will save us lots of time
and efforts .Matlab is definitely the tool needed for further education and research.

Page | 27

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)


lOMoARcPSD|33093608

Calculus Report for Topic 3: Differentiation Rules

REFERENCES:

a
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 2.7 page 143.
b
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.1 page 174.
c
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.1 page 176.
d
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 1.1 page 19.
e
https://byjus.com/maths/differentiation-rules/
f
https://www.tcd.ie/Economics/staff/ppwalsh/topic5.pdf
g
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 2.1 page 82.
h
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.2 page 189.
i
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.4 page 199.
j
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3 page 173
k
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.5 page 210.
l
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.1 page 177, 178.
m
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.1 page 180.
n
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.6 page 218.
o
James Stewart. (2010). Calculus Early Transcendentals. 7th edition. Cengage Learning. Chapter 3.10 page 252, 253.
Programs used: Matlab, Desmos

Page | 28

Downloaded by Thúy ??ng (dthanhthuy753@gmail.com)

You might also like