I'm trying to solve this 1st order ODE numerically by bringing it into an explicit form, but I don't think it is valid because of the dependency on x_n in the final expression. dy/dx+x=0 dy/dx=−x

Nola Aguilar

Nola Aguilar

Answered question

2022-11-11

I'm trying to solve this 1st order ODE numerically by bringing it into an explicit form, but I don't think it is valid because of the dependency on x_n in the final expression.
d y d x + x = 0 d y d x = x
Alpha is the angle from point with index (n) to point with index (n+1).
t a n ( α ) = d y d x t a n ( α n ) = x n
I call h the step size.
t a n ( α n ) = y n y n 1 x n x n 1 t a n ( α n ) = y n y n 1 h
When I rearrange this I obtain the following form.
y n = y n 1 + h t a n ( α n ) y n = y n 1 + h ( x n ) y n = y n 1 h x n
Is this the final numerical solution of this 1st order ODE?
y n = y n 1 h x n
EDIT: I've brought it to a better form I think.
y 1 = y 0 h x 1 y 2 = y 1 h x 2 = y 0 h x 1 h x 2 y 3 = y 2 h x 3 = y 0 h x 1 h x 2 h x 3
So that the final solution is the following. y n = y 0 h ( x 1 + . . . + x n )

Answer & Explanation

ontzeidena8a

ontzeidena8a

Beginner2022-11-12Added 17 answers

With your choice of assigning a time to the slope you get the implicit Euler method for a differential equation y ( x ) = f ( x , y ( x ) ),
y n = y n 1 + h · f ( x n , y n )
The more basic explicit Euler method has the formula
y n = y n 1 + h · f ( x n 1 , y n 1 )
so that the next value is computed from the already known value y n 1
mxty42ued

mxty42ued

Beginner2022-11-13Added 4 answers

So in this case y n = y 0 h i = 1 n ( x i )

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?