Write a computer program in the C++ programming language that solves
on a given intervaland provides the analysis of approximations.
-
Implement in the code the numerical Euler's method
-
Implement in the code the numerical Improved Euler's method
-
Implement in the code the numerical Runge-Kutta method
-
Hardcode the function of the right-hand side of the equation
as well as initial conditions
-
Solve the equation manually, hardcore the function of the analytical solution
-
For each numerical method compose the array of the local errors
given the number n of grid points
-
For each numerical method compose the array of the global errors for each number n of grid points within the range
-
Provide the functionality of printing the arrays onto the console in the format
- in the first line print the title of the array (e.g. "ti="),
- in the second line print the values stored in the array formatted "f5" (%.f5), separated by spaces, without the space after the last item, with the "\n" at the end of line. Note that decimal separator is dot(.).
Write a computer program in the C++ programming language that solves
-
Implement Euler's method as described in tutorial
-
Implement improved Euler's method as described in tutorial
-
Implement Runge-Kutta method analogically
-
Hard code the functions f(x,y,t) and g(x,y,t) as well as the initial conditions t0, x0, y0
-
Provide the functionality of printing the arrays onto the console as in the previous task