Cal211-CC05-GROUP 8
Cal211-CC05-GROUP 8
PROJECT OF CALCULUS 1
Lecturer: Đậu Thế Phiệt
Class: CC05 | Group 8
Bùi Minh Đức 2052959
Trần Khanh Danh 2052906
Nguyễn Ngọc Phước Tấn 2012020
Dương Thành Bách 2052861
1
CONTENTS
Problem 1 3
Problem 2 6
Problem 3 8
2
Problem 1: Given the parametric equations
x(t) = 𝑡 3 − 4t − 2,
{
y(t) = −2𝑡 2 + 1
Find an intersection of the curve and the tangents at that point. Draw the figure.
3
syms t h u k a b
t=-3:0.1:3
x=t.^3 -4*t-2;
y=-2*(t.^2)+1;
h=u.^3 -4*u-2;
( Let function h(u) = x(t) )
k=-2*(u.^2)+1;
( Let function k(u) = y(t) )
plot(x,y,'b-')
grid on;
fontSize = 15;
xlabel('x', 'FontSize', fontSize);
ylabel('y', 'FontSize', fontSize);
ylim([-20, 15]);
slope1=subs(diff(k,u)/diff(h,u),u,-2);
𝒅𝒚
( (𝒕𝟏) )
𝒅𝒙
slope2=subs(diff(k,u)/diff(h,u),u,2);
𝒅𝒚
( (𝒕𝟐) )
𝒅𝒙
yTangent1=subs(k,u,-2);
( y(t1) )
yTangent2=subs(k,u,2);
( y(t2) )
hold on;
yTangentline1=slope1*(x-subs(h,u,-2))+yTangent1;
𝒅𝒚
( yTangentline1 = (𝒕𝟏) × (x – x(1)) + y(1) )
𝒅𝒙
yTangentline2=slope2*(x-subs(h,u,2))+yTangent2;
𝒅𝒚
( yTangentline2 = = (𝒕𝟐) × (x – x(2)) + y(2) )
𝒅𝒙
plot(x,yTangentline1 ,'r-','LineWidth', 2);
plot(x,yTangentline2 ,'y-','LineWidth', 2);
4
5
Problem 2: A car moves along a path of street with the shape is the graph of the
function y =xex . At each position, the light ray from the car
is considered to be tangent to the street. There is a statue at the coordinates (0.35, 0.37)
(km). Assume that the car moves at a constant
velocity 60 km/h. How long does the car take in moving from A, that
has x-coordinate = −0.6 to B, where the light ray spot to the statue.
The trapezoidal formula is a using to approximate the integral of a
function. Study the formula and use it to approximate the path AB.
7
Problem 3
Euler method:
If an initial problem cannot be solved analytically, numerical methods must be used
to get reasonable approximations to a solution. In this chapter, we'll look at some of these
techniques.
Euler's technique is the simplest numerical approach for solving this equation. This
approach is so basic that it is rarely utilized in practice. However, because of its simplicity, it
is excellent for illustration. The tangent line to the integral curve of this equation at (𝑥i, 𝑦(𝑥i))
approximates the integral curve across the interval [𝑥i, 𝑥i+1] according to Euler's approach.
Since the slope of the integral curve of this equation at (𝑥i, 𝑦(𝑥 i)) is 𝑦′(𝑥i) = 𝑓(𝑥i, 𝑦(𝑥 i)) ,
the equation of the tangent line to the integral curve at (𝑥i, 𝑦(𝑥i)) is
𝑦 = 𝑦(𝑥i) + 𝑓(𝑥i, 𝑦(𝑥i))(𝑥 − 𝑥 i)
Setting 𝑥 = 𝑥i+1 = 𝑥i+ℎ
𝑦𝑖 + 1 = 𝑦(𝑥𝑖) + ℎ𝑓(𝑥𝑖, 𝑦(𝑥𝑖))
However, setting 𝑖 = 1
In general, Euler’s method starts with the known value 𝑦(𝑥0) = 𝑦0 and
computes 𝑦1, 𝑦2, … , 𝑦n successively by with the formula
8
i. Algorithm
- Start
- Define function f(x,y)
- Get the value of x0, y0, h and xn
Here:
x0 and y0 are the initial conditions
h is the interval
xn is the required value
- Caculate the steps: n = (xn – x0)/h
- Start loop from i = 1 to n
- yn = y0 + h*slope
- x0 = x0 + h
- Display yn as the result
- End
syms x y
Dy = diff(y); %Differential of y
f = dsolve('Dy + 3*x^2*y = 6*x^2','y(0)=3','x'); %Solve with dsolve
function Enter_the_value
global h
%Choose the value of h
h = menu("What is the value of h?",'h = 1','h = 0.1'...
,'h = 0.01 ','h = 0.001','Quit');
if h == 1
h = 1;
elseif h == 2
h = 0.1;
elseif h == 3
h = 0.01;
elseif h == 4
h = 0.001;
elseif h ==5
return
end
end
iii. Result
In this example we assumed that the value of initial conditions of x and y are 0 and 3,
the required value of x is 1 and the interval (h) is 0.1.
After calculating, we get the value of y when x = 1 is 2.392794 with an error is
0.024914. The figure shows the difference between the Euler method (red) and the equation
f(x) blue. The red line will be more and more matched if the h is smaller and smaller.
10
11