232k views
4 votes
Use the forward finite difference method to estimate the first derivative of f(x) = 5.4x^4 -0.12 x^3 + 2x^2 – 0.5x +1.7 at x =0.25, using a step size of h =0.5 and then with a step size of 0.125. Explicitly calculate the derivative. Then calculate the absolute relative true percent error for each step size. 5 points

User Sorean
by
6.6k points

1 Answer

5 votes

Answer:


(\Delta_(0.5)[f](0.25))/(0.5)=4.7775


(\Delta_(0.125)[f](0.25))/(0.125)=1.3999


f'(x)=0.815

For h=0.5:


E_(absolute)=3.962


E_(relative)=4.8619


E_(percent)=486\%

For h=0.125:


E_(absolute)=1.3999


E_(relative)=0.7176


E_(percent)=71.7\%

Explanation:

The forward finite difference has the next formula:


(\Delta_(h)[f](x))/(h) =(f(x+h)-f(x))/(h)

With x=0.25 and h=0.5:

x+h=0.75:


f(x)=5.4(x)^(4)-0.12(x)^(3)+2(x)^(2)-0.5(x)+1.7\\f(x+h)=5.4(x+h)^(4)-0.12(x+h)^(3)+2(x+h)^(2)-0.5(x+h)+1.7\\

then:


f(0.25)=5.4(0.25)^(4)-0.12(0.25)^(3)+2(0.25)^(2)-0.5(0.25)+1.7\\f(0.25)=1.7192\\f(0.75)=5.4(0.75)^(4)-0.12(0.75)^(3)+2(0.75)^(2)-0.5(0.75)+1.7\\f(0.75)=4.1079


(\Delta_(h)[f](x))/(h) = (f(x+h)-f(x))/(h)\\\\


(\Delta_(h)[f](x))/(h) = (4.1079-1.7192)/(0.5)=4.7775\\

Now with x=0.25 and h=0.125:

x+h=0.375:


f(x)=5.4(x)^(4)-0.12(x)^(3)+2(x)^(2)-0.5(x)+1.7\\f(x+h)=5.4(x+h)^(4)-0.12(x+h)^(3)+2(x+h)^(2)-0.5(x+h)+1.7\\

then:


f(0.25)=5.4(0.25)^(4)-0.12(0.25)^(3)+2(0.25)^(2)-0.5(0.25)+1.7\\f(0.25)=1.7192\\f(0.375)=5.4(0.375)^(4)-0.12(0.375)^(3)+2(0.375)^(2)-0.5(0.375)+1.7\\f(0.375)=1.8942


(\Delta_(h)[f](x))/(h) = (f(x+h)-f(x))/(h)\\\\


(\Delta_(h)[f](x))/(h) = (1.8942-1.7192)/(0.125)=1.3999\\

We have to find the derivative at x=0.25:


f(x)=ax^(n)\\\\f'(x)=anx^(n-1)\\


f'(x)=5.4(4)x^((4-1))-0.12(3)x^((3-1))+2(2)x^((2-1))-0.5(1)x^((1-1))\\\\f'(x) =21.6x^(3)-0.36x^(2)+4x-0.5\\\\f'(0.25)=21.6(0.25)^(3)-0.36(0.25)^(2)+4(0.25)-0.5\\\\f'(0.25)=0.815\\

Now the errors:

For h=0.5:


E_(absolute)= V_(finite)-V_(derivative)\\\\E_(absolute)= 4.7775-0.815=3.9625\\\\E_(relative)=(E_(absolute))/(V_(derivative))\\\\E_(relative)=(3.9625)/(0.815)=4.8619\\\\Percent=E_(relative)*100=486\%\\

For h=0.125:


E_(absolute)= V_(finite)-V_(derivative)\\\\E_(absolute)= 1.3999-0.815=0.5849\\\\E_(relative)=(E_(absolute))/(V_(derivative))\\\\E_(relative)=(0.5849)/(0.815)=0.7176\\\\Percent=E_(relative)*100=71.7\%\\

User Oliver Atkinson
by
7.1k points