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 specifi
Trang 1Page | 0
VIETNAM NATIONAL UNIVERSITY - HO CHI MINH
HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY
School year 2021-2022 - Semester 1
2 Lê Mai Phương 2153708 Section 3.5, Exercise 33
3 Tăng Tuấn Đạt 2152512 Section 3.10, Exercise 32
Group 5 - Class CC15
Trang 2TABLE 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
Trang 3Page | 2
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/in ) Ā 2
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?
− Increasing and Decreasing Functionsd:
o A function is called increasing on an interval I if
Trang 4Ą(þ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
Trang 6− 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 (ÿ�㕛2�㕙�㕏) for Ā
− 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 linearitye 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)
Trang 7→ Result: Result: 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;
Trang 9Page | 8
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
− Step 2: Design the graph appearance
o Name the graphs using 8legend9 command, use 'northeast' to display the annotation table
Trang 10legend({'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:
Trang 11Page | 10
− Check Command Window
Command Window automatically shows the information about the coded functions, we see:
o The variable 8slope19 has estimated Ă�㔿 ĂĀ/ when Ā = 30 to be 1613
500 = 3.226
o The variable 8slope29 has estimated Ă�㔿 ĂĀ/ when Ā = 40 to be 21141
500 =22.282
Trang 12➢ 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
Trang 13þ = �㕑þ�㕑ý(þ = ÿ is the slope of the tangent line at ) þ = ÿ.g
− An equation of the tangent line to the curve at the point (ÿ ; Ā) is
Trang 14II 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 × þ42 þ2 with respect to x
�㕑
�㕑ý(ÿ2) =�㕑ý�㕑(5þ42 þ2) (2ÿ) × �㕑�㕑ý(ÿ) = 5�㕑ý�㕑(þ4) 2 �㕑ý�㕑(þ2) (2ÿ) × ÿ′= 5 × 4þ32 2þ
− Therefore, the equation of the tangent line to the curve represented by ÿ2= 5 × þ 24
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 Instead we can use the method of k implicit
Trang 15Page | 14
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 = 5x - x4 2
− Step 3: Find the slope the tangent line to the curve with equation þ ÿ2= 5 × þ 24
þ2 by the differentiate both sides and then take the right-hand side divide the hand side
left-Use the function 8diff9
− Step 4: Find the equation of the tangent line to the curve at the point (1; 2)
Trang 16Use the function 8subs(s, old, new)’ to substitute þ = 1 and ÿ = 2 to the slope
− 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
− Step 6: Plot the tangent line y1 = 92x 2 5
2
Trang 17Page | 16
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
Trang 18for engineers and students who are studying engineering to get acquaintance with using coding program to solve the problems precisely
Trang 19We 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:
Trang 20− The Chain Rule states that: if g is differentiable at x and f is differentiable at g(x), then the composite function F(x) = (g(x)) is differentiable at and f þ �㔹´ is given by the product:
�㔹´(þ) = Ą´(ą(þ)) ą´(þ)
− Derivative rules such as:
o The Power Rule: if n is any real number, then
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)
Trang 21because
þ = Ą´(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
Trang 22− 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) witthe 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 �㔃āĀý�㔃 j 1) The results of calculations made with these approximations became the basic theoretical tool used to design lenses o
Trang 23Page | 22
III Coding details (Matlab):
1 Find the linearization of ÿ, Ā and ā
�㔿(þ) = Ą(ÿ) + Ą´(ÿ)(þ 2 ÿ) And since ÿ = 0, we could rewrite �㔿(þ) as:
Trang 24− Step 1: Initializing all relevant x values
8x = (-0.5:0.000001:0)9 helps initialize all the from þ 20.5 to with very 0
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
Trang 25− Step 1: Initializing all relevant x values
− 8x = (-0.5:0.000001:0)9 helps initialize all the x from 20.5 to with very 0small interval 0.00001 which resembles a continuous curve
Trang 26− 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: