Plotting functions with 2 Y-axes sec 001

Plotting functions with 2 Y-axes sec 001 - xo xf 0 x 6.28...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xo xf 0 x 6.28 del_x 26 h 0.25 1.00E-01 f(x)=sin(x) f'(x)=cos(x) f'=(f(x+h)-f(x))/h 0 1 0.998334 0.25 0.97 0.954546 0.48 0.88 0.850779 0.68 0.73 0.693555 0.84 0.54 0.492753 0.95 0.31 0.260989 1 0.06 0.012826 0.98 -0.19 -0.236143 0.9 -0.43 -0.470274 0.77 -0.64 -0.674856 0.59 -0.81 -0.837034 0.37 -0.93 -0.946619 0.13 -0.99 -0.996723 -0.13 -0.99 -0.984201 -0.37 -0.93 -0.909837 -0.59 -0.81 -0.778305 -0.77 -0.64 -0.597869 -0.9 -0.43 -0.379866 -0.98 -0.19 -0.137996 -1 0.06 0.112546 -0.95 0.31 0.356015 -0.84 0.54 0.577115 -0.68 0.73 0.761953 -0.48 0.88 0.898915 -0.25 0.97 0.979394 0 1 0.998334 error 0.001666 0.014038 0.025527 0.035413 0.043074 0.048028 0.049964 0.048761 0.044494 0.037432 0.028017 0.016842 0.004609 -0.007914 -0.019940 -0.030712 -0.039555 -0.045913 -0.049386 -0.049755 -0.046998 -0.041289 -0.032985 -0.022608 -0.010811 0.001666 First 1.5 sin(x), cos(x), f' approximate 0 0.25 0.5 0.75 1.01 1.26 1.51 1.76 2.01 2.26 2.51 2.76 3.02 3.27 3.52 3.77 4.02 4.27 4.52 4.78 5.03 5.28 5.53 5.78 6.03 6.28 # points 1 0.5 0 -0.5 -1 -1.5 0 1 First Forward Difference Accuracy for Sine Function 6.E-02 1 4.E-02 0.5 2.E-02 0 0.E+00 -0.5 -2.E-02 -1 -4.E-02 -1.5 -6.E-02 0 1 2 3 4 x 5 6 7 Approximation Error sin(x), cos(x), f' approximate 1.5 f(x)=sin(x) f'(x)=cos(x) f'=(f(x+h)-f(x))/h error ction f(x)=sin(x) f'(x)=cos(x) f'=(f(x+h)-f(x))/h error xo 0 xf 12.57 # points 26 del_x 0.5 h 1.00E-01 First x error 0.001666 0.025527 0.043074 0.049964 0.044494 0.028017 0.004609 -0.019940 -0.039555 -0.049386 -0.046998 -0.032985 -0.010811 0.014038 0.035413 0.048028 0.048761 0.037432 0.016842 -0.007914 -0.030712 -0.045913 -0.049755 -0.041289 -0.022608 0.001666 1.5 sin(x), cos(x), f' approximate 0 0.5 1.01 1.51 2.01 2.51 3.02 3.52 4.02 4.52 5.03 5.53 6.03 6.53 7.04 7.54 8.04 8.55 9.05 9.55 10.05 10.56 11.06 11.56 12.06 12.57 f(x)=sin(x) f'(x)=cos(x) f'=(f(x+h)-f(x))/h 0 1 0.998334 0.48 0.88 0.850779 0.84 0.54 0.492753 1 0.06 0.012826 0.9 -0.43 -0.470274 0.59 -0.81 -0.837034 0.13 -0.99 -0.996723 -0.37 -0.93 -0.909837 -0.77 -0.64 -0.597869 -0.98 -0.19 -0.137996 -0.95 0.31 0.356015 -0.68 0.73 0.761953 -0.25 0.97 0.979394 0.25 0.97 0.954546 0.68 0.73 0.693555 0.95 0.31 0.260989 0.98 -0.19 -0.236143 0.77 -0.64 -0.674856 0.37 -0.93 -0.946619 -0.13 -0.99 -0.984201 -0.59 -0.81 -0.778305 -0.9 -0.43 -0.379866 -1 0.06 0.112546 -0.84 0.54 0.577115 -0.48 0.88 0.898915 0 1 0.998334 1 0.5 0 -0.5 -1 -1.5 0 2 First Forward Difference Accuracy for Sine Function 6.E-02 1 4.E-02 0.5 2.E-02 0 0.E+00 -0.5 -2.E-02 -1 -4.E-02 -1.5 -6.E-02 0 2 4 6 8 x 10 12 14 Approximation Error sin(x), cos(x), f' approximate 1.5 f(x)=sin(x) f'(x)=cos(x) f'=(f(x+h)-f(x))/h error ction f(x)=sin(x) f'(x)=cos(x) f'=(f(x+h)-f(x))/h error ...
View Full Document

Ask a homework question - tutors are online