Reference no: EM132248556
Questions -
Q1. Consider the following ordinary differential equation
dy/dx = xy2, y(0) = 1
(a) Find the analytical solution to this problem. Hence find the exact value of y(1.5).
(b) Given that y(1.4) = 50, use the modified Euler method to calculate y(1.5). Take h = 0.1 and work to 4 decimal place accuracy.
(c) Now use the 4th order Runge-Kutta method to calculate y(1.5). As before, take y(1.4) = 50, h = 0.1 and work to 4 decimal place accuracy.
(d) Are the answers you obtained for (a), (b) and (c) similar? If not, can you explain why they differ?
(e) Using the Excel spreadsheet provided, experiment with applying both the Modified Euler and 4th Order Runge-Kutta methods to solve the given ODE from x = 0 to x = 2.0. Firstly use h = 0.1, then repeat the calculations using h = 0.05 and h = 0.025.
In your submitted answer, show tables which, at the least, give the x and computed y values at x = 0.1, 0.2, 0.3, ..., 2.0 for each value of h. What do you observe?
Do your results for each value of x change qualitatively (i.e. in their general nature), or only in their numerical values? Explain what you think occurs, and why that occurs.
(NOTE: It is ESSENTIAL that you show all your working in your solution to the above question).
Q2. Milne's method is a linear multistep predictor-corrector method for solving first order ODEs. Its "corrector" formula for solving the initial value problem
y' = f(x, y) with y(a) = b is:
yn+1 - yn-1 = h/3(fn-1+4fn+fn+1)
where yn is our estimated of y(xn) and fn = f(xn, yn) and a and b are known constants.
(a) Find the local truncation error of this method in terms of the step size, h, and hence show that the method is fourth order.
(b) Briefly explaining your reasoning (in one or two sentences), state what you require to initialise the above method, starting from x0 = a, y0 = b, and why implementation of the method is not immediately straightforward.
(c) Consider the ordinary differential equation:
dy/dx = xy, y(1) = 1
(i) Find the analytical solution, and evaluate this at x = 1.1.
(ii) Use the Taylor series method to find a series solution relative to the value x0 = 1. If x = x0 + h, include terms in increasing powers of h, up to and including the term in h4. Work to six decimal places accuracy. Use your Taylor series to find an estimate of y when x = 1.1.
(iii) Compare your answers from (i) and (ii) and comment.