Prob. 1. Solve the differential equation dx dt =-2r +12r²-20r+8.5 over the time interval of [0, 4] with the step size of
Posted: Fri Jul 01, 2022 6:56 am
Prob. 1. Solve the differential equation dx dt =-2r +12r²-20r+8.5 over the time interval of [0, 4] with the step size of 0.5 and x(0)=1. (a) Use Euler's method. (b) Use the fourth-order Runge-Kutta method. (c) Calculate the exact solution of x(1). (d) Output your results for each method in a table format with two columns of time t and x(t). Plot the results of (a)-(c) versus time in one figure using different line styles or colors. Everything must be coded in one program.