Ask Your Question
1

initial conditions in desolve

asked 2011-02-21 15:56:44 +0100

Chris gravatar image

In desolve, it is possible to specify (for a second order ODE) two different types of initial conditions i.e.: y(x_0) = y_0, y(x_1) = y_1 and y(x_0) = y_0, y'(x_0) = s_0.

Is it also possible to specify initial conditions of the form y(x_0) = y_0, y'(x_1) = s_1?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-02-21 19:48:09 +0100

I believe that only Dirichlet and Neumann boundary conditions are implemented (but would happy to be proven wrong).

The relevant part of the docs is:

  • for a second-order equation, specify the initial x, y, and dy/dx, i.e. write [x_0, y(x_0), y'(x_0)]

  • for a second-order boundary solution, specify initial and final x and y boundary conditions, i.e. write [x_0, y(x_0), x_1, y(x_1)].

So the first to boundary conditions you gave are ok. But the mixed boundary conditions don't work - you'll have to get the general solution and enforce the boundary conditions semi-manually. Here's a sage notebook with examples.

edit flag offensive delete link more

Comments

Thanks a lot, Simon! Cheers, Chris

Chris gravatar imageChris ( 2011-02-22 07:04:19 +0100 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-02-21 15:56:44 +0100

Seen: 831 times

Last updated: Feb 21 '11