0% found this document useful (0 votes)
15 views7 pages

Homework 3-Answer Key

This document outlines homework assignments for an Advanced Mathematics course, including practice problems related to the growth of a palm tree, numerical differentiation using forward and central difference methods, and integration using the trapezoidal rule. It provides detailed solutions and calculations for each question, along with error estimations and convergence rates. The homework is due by midnight on November 11, 2023, and must be submitted electronically.

Uploaded by

amamoursi
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)
15 views7 pages

Homework 3-Answer Key

This document outlines homework assignments for an Advanced Mathematics course, including practice problems related to the growth of a palm tree, numerical differentiation using forward and central difference methods, and integration using the trapezoidal rule. It provides detailed solutions and calculations for each question, along with error estimations and convergence rates. The homework is due by midnight on November 11, 2023, and must be submitted electronically.

Uploaded by

amamoursi
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/ 7

Advanced Mathematics Course – Homework 3

Practice problems -Homework due before midnight 11/11/2023 at Canvas. Please only use a
writing processing software such as Word for writing- no handwritten homework will be
accepted!

Question 1:
3
During a lab experiment, the height of a palm tree increased at a rate of (2𝑡 + 5)−4 cm
per day, where t represents the number of days since the start of the experiment.
(a) If the tree was 31 cm high at the beginning (𝑡 = 0), what would its height be after 10
days?
(b) When will the height of the tree be 43 cm?
(c) What’s the height change from day 20 to day 80?
(d) What is the error in the height measurement after 100 ± 0.1 days from t=0?

Solution:
(a)
3
𝑟(𝑡) = (2𝑡 + 5)−4
3 1
h(t) = ∫(2t + 5)−4 dt = 2(2t + 5)4 + c
1
h(0) = 2(2 ⋅ 0 + 5)4 + c = 31 → c = 28.0093
1
h(10) = 2(2 ⋅ 10 + 5)4 + 28.0093 = 32.4814 cm

1
(b) 2(2t̅ + 5)4 + 28.0093 = 43 → t̅ = 1575.611 da𝑦𝑠
3 1 1
80
(c) ∫20 (2t + 5)−4 = [ 2(2x80 + 5)4 + 28] − [2(2x20 + 5)4 + 28] = 1.988 cm
2
∂h 2 3 3
(d) σh = √( ∂t ) σ2t = √((2 ∗ 100 + 5)−4 ) ∗ 0.12 = (2 ∗ 100 + 5)−4 ∗ 0.1 = 0.0018
Question 2:
Given the function

𝑓(𝑥) = 𝑥3 − 4𝑥2 − 6𝑥 – 2

(a) Using the Forward Difference Method:

• Approximate the derivative at x = 2 for the step sizes h = 0.01 and h= 0.001.

𝑓(𝑥 + h) − 𝑓(𝑥)
𝑓 ′ (𝑥) = lim
ℎ→h h
3 2
′ (𝑥)
((𝑥 + ℎ) − 4(𝑥 + ℎ) − 6(𝑥 + h) − 2) − (𝑥 3 − 4𝑥 2 − 6𝑥 − 2)
𝑓 = lim
ℎ→h h
For h = 0.01
𝑓(2.01) − 𝑓(2)
𝑓 ′ (2) = lim
ℎ→0.01 0.01
3 2
((2.01) − 4(2.01) − 6(2.01) − 2) − (23 − 4(2)2 − 6(2) − 2)
𝑓 ′ (2) = lim
ℎ→0.01 0.01
𝑓 ′ (2) = −9.9799
For h = 0.001
𝑓(2 + 0.01) − 𝑓(2)
𝑓 ′ (2) = lim
ℎ→0.001 0.001
3 2
((2.001) − 4(2.001) − 6(2.001) − 2) − (23 − 4(2)2 − 6(2) − 2)
𝑓 ′ (2) = lim
ℎ→0.001 0.001
𝑓 ′ (2) = −9.997999

• Calculate the associated error for each step size ℎ.

h 𝒇 `(𝟐) Error Exact Value


0.1 -9.7900 0.2100 -10
0.01 -9.9799 0.0201 -10
0.001 -9.9980 0.002001 -10
0.0001 -9.9998 0.00020001 -10

• Determine the rate of convergence


Linearly proportional with h

This occurs when the error decreases proportionally to the number of subdivisions. In
other words, doubling the number of subdivisions (increasing h halves the error. This is
typical for simpler numerical methods or methods applied to functions that are not
sufficiently smooth.

(a) Using the Central Difference Method:

• Approximate the derivative at x = 2 for the step sizes h = 0.01 and h= 0.001.
Using central scheme:

For h = 0.01

((2 + 0.01)3 − 4(2 + 0.01)2 − 6(2 + 0.01) − 2 − ((2 − 0.01)3 − 4(2 − 0.01)2 − 6(2 − 0.01) − 2))
𝑓 ′ (2) = lim
ℎ→0.01 0.01
= −9.9999
For h = 0.001

((2 + 0.001)3 − 4(2 + 0.001)2 − 6(2 + 0.001) − 2 − ((2 − 0.001)3 − 4(2 − 0.001)2 − 6(2 − 0.001) − 2))
𝑓 ′ (2) = lim
ℎ→0.001 0.001
= −9.999999
• Calculate the associated error for each step size ℎ.

h 𝒇 `(𝟐) Error Exact Value


0.1 -9.99 0.01 -10
0.01 -9.9999 0.0001 -10
0.001 -9.999999 1E-06 -10
0.0001 -10 9.99E-09 -10

• Determine the rate of convergence


Quadratically proportional with h

This is observed when the error decreases with the square of the number of subdivisions.
For example, doubling h would reduce the error by a factor of four. The trapezoidal rule
and Simpson's rule often exhibit quadratic convergence for functions that are sufficiently
smooth (i.e., have continuous second derivatives).
Question 3:
Given the function:
𝑓(𝑥) = 𝑒−𝑥2

(a) Apply the trapezoidal rule to estimate the definite integral of f(x) over the interval [−1,1]
using n = 2, n= 4, and n=6.

1 𝑏−𝑎
∫−1 ⅇ−𝑥2 𝑑𝑥 Δ𝑥 = 𝑛

Δ𝑥
𝑇𝑛 = [𝑓(𝑥0 ) + 2𝑓(𝑥1 ) … + 2𝑓(𝑥𝑛−1 ) + 𝑓(𝑥𝑛 )]
2
For n=2
1 − (−1)
Δ𝑥 = =1
2
−1,0,1
1
𝑇2 = [𝑓(−1) + 2𝑓(0) + 𝑓(−1)]
2
1 −(−1)2 2 2
𝑇2 = [ⅇ + 2ⅇ−(0) + ⅇ−(1) ]
2
𝑻𝟐 = 𝟏. 𝟑𝟔𝟕𝟖𝟕𝟗
For n=4
1 − (−1)
Δ𝑥 = = 0.5
4
−1, −0.5,0,0.5,1
0.5
𝑇4 = [𝑓(−1) + 2𝑓(−0.5) + 2𝑓(0) + 2𝑓(0.5) + 𝑓(−1)]
2
1 −(−1)2 2 2 2 2
𝑇4 = [ⅇ + 2ⅇ−(−0.5) + 2ⅇ−(0) + 2ⅇ−(0.5) + ⅇ−(1) ]
4
𝑻𝟒 = 𝟏. 𝟒𝟔𝟐𝟕𝟒
For n=6
1 − (−1) 1
Δ𝑥 = =
6 6
−1, − 2⁄3 , , − 1⁄3 , 0, 1⁄3 , 2⁄3 , 1
1⁄
𝑇6 = 3 [𝑓(−1) + 2𝑓(− 2⁄3) + 2𝑓(− 1⁄3) + 2𝑓(0) + 2𝑓(1⁄3) + 2𝑓(2⁄3) + 𝑓(−1)]
2
1 −(−1)2 2 2 1 2 2 1 2 2 2 2
𝑇6 = [ⅇ + 2ⅇ−(− ⁄3) + 2ⅇ−(− ⁄3) + 2ⅇ−(0) + 2ⅇ−( ⁄3) + 2ⅇ−( ⁄3) + ⅇ−(1) ]
6
𝑻𝟔 = 𝟏. 𝟒𝟕𝟗𝟗𝟕𝟐

(b) For each value of n, compute the associated error.

Computed Errors: The absolute difference between the trapezoidal rule approximation and the
exact value of the integral I=1.49364.

Estimated Error: The estimated error for the trapezoidal rule is given by:

(𝑏 − 𝑎)3
𝐸𝑟𝑟𝑜𝑟: 𝐸(∆𝑥) = 𝑀
12𝑛 2
𝑀 ≥ |𝑓′′(𝑥)|

𝐹𝑖𝑛𝑑 𝑡ℎ𝑒 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑜𝑓 𝑓 ′′ (𝑥) 𝑜𝑛[−1,1]


2
𝑓 ′ (𝑥) = −2𝑥𝑒 −𝑥
2
𝑓 ′′ (𝑥) = 𝑒 −𝑥 (4𝑥 2 − 2)

𝐸𝑣𝑎𝑙𝑢𝑎𝑡𝑒 𝑓 ′′ (𝑥) 𝑎𝑡 𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑝𝑜𝑖𝑛𝑡𝑠 𝑤𝑖𝑡ℎ𝑖𝑛 𝑡ℎ𝑒 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 𝑎𝑛𝑑 𝑒𝑛𝑑𝑝𝑜𝑖𝑛𝑡𝑠


𝑓 ′′ (−1) = 0.7358, 𝑓 ′′ (0) = |2|, 𝑓 ′′ (1) = 0.7358.
∴𝑀=2

n Estimated Error E(Δx) Computed Error

(1 + 1)3 23 1 𝐸𝑟𝑟𝑜𝑟 = 1.49364 − 1.367879


2 𝐸(∆𝑥) = 2
2 = 2 = ≈ 0.33333
12(2) 48 3 = 0.12576

(1 + 1)3 23 1 𝐸𝑟𝑟𝑜𝑟 = 1.49364 − 1.462741


4 𝐸(∆𝑥) = 2 = 2 = ≈ 0.08333
12(4)2 192 12 = 0.03090
(1 + 1)3 23 1 𝐸𝑟𝑟𝑜𝑟 = 1.49364 − 1.4799
6 𝐸(∆𝑥) = 2 = 2= ≈ 0.03704
12(6) 2 432 27 = 0.01374
Question 4:

Consider the function 𝑓(𝑥) = 𝑐𝑜𝑠(𝑥2) on the interval [𝑎, 𝑏] = [0, 𝜋].

(a) Determine the number of intervals (n) needed for Simpson's rule to achieve a desired
precision of 10−4 and
(b) Calculate the solution using that interval
(c) Compare your numerical solution to the exact solution.

Solution:
𝑓′(𝑥) = −2x sin(𝑥 2 )

𝑓 ′′ (𝑥) = −2x sin(𝑥 2 ) − 2𝑥(2𝑥 cos(𝑥 2 )) = −2 sin(𝑥 2 ) − 4𝑥 2 cos(𝑥 2 )

𝑓 ′′′ (𝑥) = −2(−4𝑥 3 sin(𝑥 2 ) + 6𝑥 cos(𝑥 2 ))

𝑓 ′′′′ (𝑥) = −2(−8𝑥 4 cos(𝑥 2 ) − 24𝑥 2 sin(𝑥 2 ) + 6 cos(𝑥 2 ))

Maximum value of f’’’’(x) between [0, 𝝅] of the fourth derivative:

(𝑏 − 𝑎)5
𝐸(∆𝑥) = 𝑀
180𝑛4

𝑀 ≥ |𝑓 (4) (𝑥)|

𝐸(∆𝑥) = 0.0001

In order to maximize the fourth derivative, we need to find the absolute value of the global
extremum of the function in the interval [0, 𝝅]. Analytically this can be found using the 1st
derivative test (5th derivative in this example since deriving the fourth derivative will yield the
5th derivative). Since 𝑓4(𝑥) is complicated, we rely on a graphical interpretation of the function.

Maximum point is at x= 𝝅 and 𝑀 ≥ |𝑓4(𝑥)| ≥ |−1601.2|

(𝜋 − 0)5
(1601.2) = 0.0001
180𝑛4
(𝜋)5 × (1601.2)
= 0.0001
180𝑛 4
(𝜋)5 × (1601.2)
= 𝑛4
180 × 0.0001

4 (𝜋)5 × (1601.2)
√ =𝑛
180 × 0.0001

n = 72.23 ≈ 72
b
∆x
∫ f(x)dx = [f(x0 ) + 4f(x1 ) + 2f(x2 ) + 4f(x3 ) + 2f(x4) … + 2f(xn−2 ) + 4f(xn−1 ) + f(xn )]
a 3
𝝅
∫ 𝒄𝒐𝒔(𝒙𝟐 ) = 𝟎. 𝟓𝟔𝟓𝟔𝟗𝟐
𝟎

Numerically,
𝜋
∫ cos(𝑥 2 ) = 0.565692
0

Analytically,
𝜋
∫ cos(𝑥 2 ) = 0.565694
0

Error = | 0.565694 − 0.565692 | = 2 × 10−6

You might also like