Question: Please provide the answers and the code. Perform an error analysis to compare ( a ) vs . ( c ) , and ( b

Please provide the answers and the code.
Perform an error analysis to compare (a) vs.(c), and (b) vs.(d)
procedure Taylor 4(f,a,b,xa,n)
integer k; real h,t,x,x',x'',x''',x(4)
external function f1,f2,f3,f4
hlarrb-an
tlarra
xlarrxa
output 0,t,x
for k=1 to n do
x'larrf1(t,x)
x''larrf2(t,x,x')
x'''larrf3(t,x,x',x'')
x(4)larrf4(t,x,x',x'',x''')
xlarrx+h[x'+12h[x''+13h[x'''+14h[x(4)]]]]
tlarrt+h
output k,t,x
end for
procedure RK4(f,a,b,xa,n)
integer j,n:, real K1,K2,K3,K4,a,b,xa,h
external function f
hlarrb-an
tlarra
xlarrxa
output 0,t,x
for j=1 to n do
K1larrhf(t,x)
K2larrhf(t+12h,x+12K1)
K3larrhf(t+12h,x+12K2)
K4larrhf(t+h,x+K3)
xlarrx+16(K1+2K2+2K3+K4)
tlarrt+h
output j,t,x
end for
end procedure RK4
Legend:
f is the ODE function to be solved (i.e.x'(t)=dots )
a is starting time, xa the initial condition at that time (i.e.x(a))
b is the time for which x(b) must be solved
n is the number of time steps
Use single (float) precision for manual calculations (i.e.6 significant digits)
 Please provide the answers and the code. Perform an error analysis

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!