Porisma

Worked solution

Build a shifted-tangent expansion and measure its error

Given y=tan⁡(π/4+x)y=\tan(\pi/4+x), show that d2ydx2=2ydydx\dfrac{d^2y}{dx^2}=2y\dfrac{dy}{dx}. Find its series through x4x^4. When x=0.1x=0.1, y=1.22304888y=1.22304888 correct to 8 decimal places. Verify that the fourth-degree estimate has error about 0.004%0.004\%.

CJC · Discussion · Question 8

Answer

1+2x+2x2+83x3+103x4+O(x5)1+2x+2x^2+\tfrac83x^3+\tfrac{10}3x^4+O(x^5); estimate 1.2231.223, error about 0.004%0.004\%.

Differentiate recursively

y′=sec⁡2(π/4+x)=1+y2y^\prime=\sec^2(\pi/4+x)=1+y^2, so y′′=2yy′y^{\prime\prime}=2yy^\prime. Further differentiation gives y′′′=2yy′′+2(y′)2y^{\prime\prime\prime}=2yy^{\prime\prime}+2(y^\prime)^2 and y(4)=2yy′′′+6y′y′′y^{(4)}=2yy^{\prime\prime\prime}+6y^\prime y^{\prime\prime}.

How did this part go?

Evaluate the derivatives and assemble the series

At zero, y=1y=1, y′=2y^\prime=2, y′′=4y^{\prime\prime}=4, y′′′=16y^{\prime\prime\prime}=16 and y(4)=80y^{(4)}=80. Therefore y=1+2x+4x2/2!+16x3/3!+80x4/4!+O(x5)=1+2x+2x2+83x3+103x4+O(x5)y=1+2x+4x^2/2!+16x^3/3!+80x^4/4!+O(x^5)=1+2x+2x^2+\tfrac83x^3+\tfrac{10}3x^4+O(x^5).

How did this part go?

Calculate the percentage error

At x=0.1x=0.1, the fourth-degree polynomial equals 1.2231.223. Relative to the supplied value, the percentage error is 1.22304888−1.2231.22304888×100%≈0.00399657%≈0.004%\dfrac{1.22304888-1.223}{1.22304888}\times100\%\approx0.00399657\%\approx0.004\%.

How did this part go?

Common mistakes

Divide derivative values by the corresponding factorials; percentage error uses the reference value in the denominator.

Read the hint