Quiz2 Solution
Quiz2 Solution
STUDENT ID:
1. The Taylor series for a function f (x) is — 6
h h2 h3 h4 h5 (CO1)
f (x + h) = f (x) + f 0 (x) + f 00 (x) + f 000 (x) + f 0000 (x) + f 00000 (x) + . . . (PO2)
1! 2! 3! 4! 5!
Using the Taylor series (with at least the first 4 terms), derive the Maclaurin series of —
(i) ln(1 + x)
(ii) ln(1 − x)
1+x
Then use these two series to determine the Maclaurin series of ln .
1−x
Solution:
The Maclaurin series of a transcendental function is simply a Taylor series around the point
x = 0.
d 1 d n
We know, (ln(x)) = , and (x ) = nxn−1 .
dx x dx
(i) Now, for f (x) = ln(1 + x), let’s calculate the derivatives at the point x = 0.
1 1
f (x) = ln(1 + x), f (0) = ln(1 + 0) = ln(1) = 0; f 0 (x) = , f 0 (0) = = 1;
1+x 1+0
1 1 2 2
f 00 (x) = − 2
, f 00 (0) = − 2
= −1; f 000 (x) = 3
, f 000 (0) = = 2;
(1 + x) (1 + 0) (1 + x) (1 + 0)3
Using the first 4 terms of the Taylor series,
h h2 h3
f (x + h) = f (x) + f 0 (x) + f 00 (x) + f 000 (x) + . . .
1! 2! 3!
For x = 0,
h h2 h3
f (0 + h) = f (0) + f 0 (0) + f 00 (0) + f 000 (0) + . . .
1! 2! 3!
h2 2h3
⇒ f (h) = 0 + h − + + ...
2! 3!
x2 2x3
⇒ f (x) = 0 + x − + + ...
2! 3!
x2 2x3
⇒ ln(1 + x) = 0 + x − + + ...
2! 3!
x2 2x3
⇒ ln(1 + x) = x − + + ...
2! 3!
a
We know, ln = ln(a) − ln(b).
b
So,
1+x
ln = ln(1 + x) − ln(1 − x)
1−x
x2 2x3 x2 2x3
= x− + + . . . − −x − − + ...
2! 3! 2! 3!
4x3
= 2x + + ...
3!
Rubric:
Solution:
Any 2 valid comparisons will suffice. Some comparisons can be—
Rubric:
Determine the value of the specific heat at T = 61°C using the Direct method of interpolation and
a second order polynomial.
Solution:
For second order polynomial interpolation (also called quadratic interpolation), the equation for
the specific heat would be —
C(T ) = a0 + a1 T + a2 T 2
Here, the order n = 2. Now, let’s choose the nearest n + 1 = 2 + 1 = 3 points that bracket the
point T = 61°C and evaluate the polynomial. The 3 points are T0 = 42, T1 = 52, and T2 = 82.
The respective specific heat values are C(T0 ) = 4179, C(T1 ) = 4186, and C(T2 ) = 4199. Using
these values, we obtain the following equations —
C(42) = a0 + a1 × 42 + a2 × (42)2 = 4179
C(52) = a0 + a1 × 52 + a2 × (52)2 = 4186
C(82) = a0 + a1 × 82 + a2 × (82)2 = 4199
Writing these equations in matrix form, we have —
−1
1 42 1764 a0 4179 a0 1 42 1764 4179
1 52 2704 · a1 = 4186 ⇒ a1 = 1 52 2704 · 4186
1 82 6724 a2 4199 a2 1 82 6724 4199
533 287 91
50 −
a0 25 50
4179
67 31 47
⇒ a1 = − 200 − · 4186
a2 75 600 4199
1 1 1
−
400 300 1200
a0 4135
⇒ a1 = 1.3267
a2 −6.6667 × 10−3
Hence,
C(T ) = 4135 + 1.3267T − 6.6667 × 10−3 T 2 ; 42 ≤ T ≤ 82
Proof: Let us use proof by contradiction. If the polynomial is not unique, then at least two
polynomials of order n or less pass through the n + 1 data points.
Assume two polynomials Pn (x) and Qn (x) go through n + 1 data points (x0 , y0 ), (x1 , y1 ), . . . ,
(xn , yn ). Then,
Rn (x) = Pn (x) − Qn (x)
Since Pn (x) and Qn (x) pass through all the n + 1 data points, we can say,
Pn (xi ) = Qn (xi ) ∀i ∈ {0, . . . , n}
Hence
Rn (xi ) = Pn (xi ) − Qn (xi ) ∀i ∈ {0, . . . , n}
⇒Rn (xi ) = 0
The nth order polynomial Rn (x) has n + 1 zeros. A polynomial of order n can have n + 1 zeros
only if it is identical to a zero polynomial, that is,
Rn (x) ≡ 0
⇒Pn (x) ≡ Qn (x)
So, Pn (x) and Qn (x) must be the same unique polynomial, which contradicts our initial assump-
tion. Q.E.D.
Rubric: