Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider an autonomous system of n coupled first order differential equations in a vector form: d u d t = f ( u ) ,

Consider an autonomous system of n coupled first order differential equations in a vector form:
dudt=f(u),u(t0)=u0,
where u=(u1,u2,...,un) and f=(f1,f2,...,fn).
An efficient way to solve this system (compute un+1 at t=tn+t), using the RK4 scheme is to
recast the scheme in autonomous vector form:
k1=tf(un)
k2=tf(un+12k1)
k3=tf(un+12k2)
k4=tf(un+k3)
un+1=un+16(k1+2k2+2k3+k4), for n=0,1,2,...
u=2(x)^(1)(u ln x)+(x)^(1), u(1)=0(1)
Write a MatLab.m file to implement this algorithm to solve an autonomous first order system of equations. The vectors f and u0, the step size t and the number of steps should be inputs to the function 1.
Given that the exact solution of (1) is yexact =(ln x)2+ ln x.(2).
Use your MatLab function numerically determine how the error at x =1.8 depends on h. Choosing suitable values for step-size h, plot log |error| versus log h. Use your plot to determine a relationship between the error and h. How accurate is the method? Is this what you would
expect? Please discuss.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions