0% found this document useful (0 votes)
2 views

Lab05_06

The document outlines a series of calculus exercises for IT students, including finding derivatives, tangent lines, and slopes of curves. It also includes programming tasks to compute derivatives and analyze functions using numerical methods like the Newton-Raphson method. Additionally, it covers practical applications such as cost and revenue calculations related to production.

Uploaded by

dinhhien150706
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab05_06

The document outlines a series of calculus exercises for IT students, including finding derivatives, tangent lines, and slopes of curves. It also includes programming tasks to compute derivatives and analyze functions using numerical methods like the Newton-Raphson method. Additionally, it covers practical applications such as cost and revenue calculations related to production.

Uploaded by

dinhhien150706
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Ton Duc Thang University

Faculty of Information Technology

Lab 4 & 5
CALCULUS FOR IT - 501031

1 Exercises
Exercise 1: Write a computer program to find the derivative of functions

(a) f (x) = 4 − x2 1 (e) k(z) =


p
(3z)
(c) g(t) =
t2
1−z p
(b) f (x) = (x − 1)2 + 1 (d) k(z) = (f) k(z) = (2z + 1)
2z

Exercise 2: Find the equation of the line tangent of the following functions, then draw the graph.

(a) f (x) = x2 + 1, (2, 5) 8 8


(d) g(x) = , (2, 2) (g) f (x) = √ , (6, 4).
√x2 x−2
(b) f (x) = x − 2x2 , (1, -1)
(e) g(x) = x, (4, 2)
x √
(c) f (x) = , (3, 3) (f) h(t) = t3 + 3t, (1, 4) (h) g(z) = 1 + 4 − z, (3, 2).
x−2

Exercise 3: Find the slope of the curve at the point indicated, and then find the equation of the corre-
sponding tangent.

(a) f (x) = 5x − 3x2 , x = 1 (c) f (x) = x3 − 2x + 7, x = −2


1 x−1
(b) f (x) = ,x=3 (d) f (x) = ,x=0
x−1 x+1
2x2
Exercise 4: Find the derivative of function y = − + x at x = 0 by the definition
3

Hint:
f (x0 + ∆x) − f (x0 )
• f 0 (x0 ) = lim∆x→0
∆x
• Calculate function value at a point.

Exercise 5: Using the definition formula of derivatives f to find the values of the derivatives as specified.

1 0 √
(a) f (x) = 4 − x2 , f 0 (−3), f 0 (0), f 0 (1) (c) g(t) = , g (−1), g 0 (2), g 0 ( 3)
t 2

1−z 0 √
(b) F (x) = (x − 1)2 + 1, F 0 (−1), F 0 (0), F 0 (2) (d) k(z) = , k (−1), k 0 (1), k 0 ( 2)
2z

Exercise 6: Use the formula below

Anh H. Vo - [email protected] 1
Ton Duc Thang University
Faculty of Information Technology

f (z) − f (x)
f 0 (x) = limz→x
z−x

to find the derivative of the functions below:

1 x
(a) f (x) = (c) f (x) =
x+2 x−1

(b) f (x) = x2 − 3x + 4 (d) f (x) = 1 + x

Exercise 7: Write a computer program to perform the following steps

• Step 1: Plot y = f (x) over the interval (x0 − 1/2 ≤ x ≤ (x0 + 3))
• Step 2: Holding x0 fixed, the difference quotient
f (x0 + h) − f (x0 )
q(h) =
h
at x0 becomes a function of the step size h.
• Step 3: Find the limit of q as h → 0.
• Step 4: Define the tangent lines y = f (x0 ) + q(x − x0 ) for h = 3, 2 and 1. Graph them together
with f and the tangent line over the interval in step 1.
Evaluate program by the functions

(a) f (x) = x3 + 2x, x0 = 0 (c) f (x) = x + sin(2x), x0 = π/2


5
(b) f (x) = x + , x0 = 1 (d) f (x) = cosx + 4sin(2x), x0 = π
x

Exercise 8: Given f (x) = x3 − 3x + 1 (C). Find the tangent line of (C) in the cases:
(a) At a point x0 = 3
(b) The tangent line is parallel to y = 9x + 2
2
(c) The tangent line at A = ( , −1)
3
Exercise 9: Find f 0 (x) and use it to find equations of the tangent lines to curve f (x) = 4x2 − x3 at points
(2, 8) and (3, 9). Illustrate your result by graphing the curve and the tangent lines on the same graph.

Exercise 10: Determine the differentiable function or not


1
(a) f1 (x) = (x − 1) 3 at x = 1
(
−(x + 2), if x ≤ −2
(b) f2 (x) =
x + 2, if x > −2
(
x2 , if x ≥ 0
(c) f3 (x) =
0, if x < 0

Exercise 11: Determine whether f 0 (0) exists (f (x) is differentiable at x = 0)



xsin 1 , if x 6= 0
(a) f (x) = x
0 if x = 0

Anh H. Vo - [email protected] 2
Ton Duc Thang University
Faculty of Information Technology


x2 sin 1 , if x 6= 0
(b) f (x) = x
0 if x = 0

Exercise 12: Suppose that it costs


c(x) = x3 − 6x2 + 15x
dollars to produce x radiators when 8 to 30 radiatord are produced. Your shop currently produces 10
radiators a day. Write a program to compute how much extra will it cost to produce one more radiator
a day.
Exercise 13: Suppose that the revenue from selling x washing machines is
1
r(x) = 20, 000(1 − ) dollars
x
Write a program to find the marginal revenue when 100 machines are produced.
Exercise 14: When a bactericide was added to a nutrient broth in which bacteria were growing, the
bacterium population continued to grow for a while, but then stopped growing and began to decline.
The size of the population at time t (hours) was

b = 106 + 104 t − 103 t2

Find the growth rates at


(a) t = 0 hours
(b) t = 5 hours
(c) t = 10 hours
Exercise 15: A rock thrown vertically upward from the surface of the moon at a velocity of 24 m/sec
reaches a height of s = 24t − 0.8t2 m in t sec. Write a program to
(a) Find the rock’s velocity and acceleration at time t.
(b) How long does it take the rock to reach its highest point?
(c) How high does the rock go?
Exercise 16: Write a program to implement Newton algorithm, find the approximation of the root func-
tion. Perform Newton-Raphson method by
(a) f (x) = 2x3 + 3x − 1 with starting interval p0 = 2 and a tolerance  = 10−8 . Then, put the results
in a table and plot the graph.
(b) f (x) = x3 − 4, perform 3 iterations with starting point p0 = 2. Then, put the results in a table
and plot the graph.

Anh H. Vo - [email protected] 3
Ton Duc Thang University
Faculty of Information Technology

Algorithm 1 Newton Method


Let f : R −→ R be a differentiable function. The following algorithm computes an approximate solution x∗
to the equation f (x) = 0
Choose an initial guess x0
for k = 1, 2, 3, ... do
if f (xk ) is sufficiently small then
x∗ = xk
return x∗
end
f (xk )
xk+1 = xk − 0
f (xk )
if | xk+1 − xk | is sufficiently small then
x∗ = xk+1
return x∗
end
end

Anh H. Vo - [email protected] 4

You might also like