3 Routine clean-up

# how to calculate Calculating the error forin the solution of a system of ODEs solved by NDSolve

I have solved system of ODEs by using the NDSolve and iNDSolve. I want to calculate the error for my system of equationsthe solutions. So far iI have calculated error by plotting results of each equation. 1. Is it the correct way to obtain the error for my problem? 2. I am not sure the results I got are accurate enough depending upon this error analysis or not? If not, then kindly suggest some other way to calculate the error for my problem.

Many thanks in advance.

1. Is what I'm doing the correct way to obtain the error for my problem?
2. I am not sure the results I am getting are accurate enough. If not, then kindly suggest some other way to calculate the error.

My code for sytemsolving the system of ODEs

s =
NDSolve[
{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t],
x' == -1 + x, y == 0, x == 0, y' == 0}, {x,
{x, y}, {t, 20}]


To obtainI am examining the error for one ofthe 1st equation is as followswith

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10},
WorkingPrecision -> 50] theand for my secondthe 2nd equation is as follows

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] # how to calculate the error for the system of ODEs solved by NDSolve

I have solved system of ODEs by using the NDSolve and i want to calculate the error for my system of equations. So far i have calculated error by plotting results of each equation. 1. Is it the correct way to obtain the error for my problem? 2. I am not sure the results I got are accurate enough depending upon this error analysis or not? If not, then kindly suggest some other way to calculate the error for my problem.

Many thanks in advance.

My code for sytem of ODEs

s = NDSolve[{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t],
x' == -1 + x, y == 0, x == 0, y' == 0}, {x,
y}, {t, 20}]


To obtain the error for one of equation is as follows

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10},
WorkingPrecision -> 50] the for my second equation is as follows

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] # Calculating the error in the solution of a system of ODEs

I have solved system of ODEs by using NDSolve. I want to calculate the error of the solutions. So far I have calculated error by plotting results of each equation.

1. Is what I'm doing the correct way to obtain the error for my problem?
2. I am not sure the results I am getting are accurate enough. If not, then kindly suggest some other way to calculate the error.

My code for solving the system of ODEs

s =
NDSolve[
{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t],
x' == -1 + x, y == 0, x == 0, y' == 0},
{x, y}, {t, 20}]


I am examining the error for the 1st equation with

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] and for the 2nd equation

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] I have solved system of ODEs by using the NDSolve and i want to calculate the error for my system of equations. So far i have calculated error by plotting results of each equation. 1. Is it the correct way to obtain the error for my problem? 2. I am not sure the results I got are accurate enough depending upon this error analysis or not? If not, then kindly suggest some other way to calculate the error for my problem.

Many thanks in advance.

My code for sytem of ODEs

s = NDSolve[{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t], x' == -1 + x, y == 0, x == 0, y' == 0}, {x, y}, {t, 20}]

s = NDSolve[{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t],
x' == -1 + x, y == 0, x == 0, y' == 0}, {x,
y}, {t, 20}]


To obtain the error for one of equation is as follows

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10},
WorkingPrecision -> 50]


Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] [ ]1 the for my second equation is as follows

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50]


Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] [ ]2 I have solved system of ODEs by using the NDSolve and i want to calculate the error for my system of equations. So far i have calculated error by plotting results of each equation. 1. Is it the correct way to obtain the error for my problem? 2. I am not sure the results I got are accurate enough depending upon this error analysis or not? If not, then kindly suggest some other way to calculate the error for my problem.

Many thanks in advance.

My code for sytem of ODEs

s = NDSolve[{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t], x' == -1 + x, y == 0, x == 0, y' == 0}, {x, y}, {t, 20}]

To obtain the error for one of equation is as follows

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] [ ]1

the for my second equation is as follows

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] [ ]2

I have solved system of ODEs by using the NDSolve and i want to calculate the error for my system of equations. So far i have calculated error by plotting results of each equation. 1. Is it the correct way to obtain the error for my problem? 2. I am not sure the results I got are accurate enough depending upon this error analysis or not? If not, then kindly suggest some other way to calculate the error for my problem.

Many thanks in advance.

My code for sytem of ODEs

s = NDSolve[{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t],
x' == -1 + x, y == 0, x == 0, y' == 0}, {x,
y}, {t, 20}]


To obtain the error for one of equation is as follows

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10},
WorkingPrecision -> 50] the for my second equation is as follows

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] 1

# how to calculate the error for the system of ODEs solved by NDSolve

I have solved system of ODEs by using the NDSolve and i want to calculate the error for my system of equations. So far i have calculated error by plotting results of each equation. 1. Is it the correct way to obtain the error for my problem? 2. I am not sure the results I got are accurate enough depending upon this error analysis or not? If not, then kindly suggest some other way to calculate the error for my problem.

Many thanks in advance.

My code for sytem of ODEs

s = NDSolve[{x''[t] == -(1/2)*y[t]*x'[t], y''[t] == x'[t], x' == -1 + x, y == 0, x == 0, y' == 0}, {x, y}, {t, 20}]

To obtain the error for one of equation is as follows

Plot[(x''[t] + (1/2)*y[t]*x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] [ ]1

the for my second equation is as follows

Plot[(y''[t] + x'[t]) /. s, {t, 1, 10}, WorkingPrecision -> 50] [ ]2