Ask Your Question
0

How to solve ODE y'' - 4y' + y - x = 0 using rk4?

asked 2016-09-05 20:29:59 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

How to solve ODE y''+y''-4y'+x = 0 using rk4?

edit retag flag offensive close merge delete

Comments

This looks like homework. If you want some help, you should ask more precise questions related to your research in solving those exercises, especially where you are locked.

tmonteil gravatar imagetmonteil ( 2016-09-06 02:32:07 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-09-06 02:31:29 -0500

tmonteil gravatar image
edit flag offensive delete link more

Comments

I got a way to solve the differential equation. If wrong please correct;)

To solve this differential equation we must first make a variable substitution to reduce the differential equation for a first order and thus create a system of ODEs. variable change:

w1 = y w2 = y w3 = y '

Thus, deriving the above variables, we have a system of equations of the form:

w1 '= w2 w2 '= f (x, w1, w2) = 4 * w2 + x

desolve_system_rk4([w2, 4*w2 + x ],[w1 , w2], ics = [0,1,0],ivar = x, step = 0.1, end_points = 2)

jmarcellopereira gravatar imagejmarcellopereira ( 2016-09-06 16:18:07 -0500 )edit
0

answered 2016-09-06 12:08:22 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I tryed

 # w = y''
 # z = y'

var('x, w, z')

desolve_system_rk4( [w , 4*z + x] , [w,z] , ics = [0,1,0], ivar = x, end_points = 10, step = 0.1)

But does no work correty :(

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-05 20:29:59 -0500

Seen: 47 times

Last updated: Sep 06 '16