[SOLVED] Numerical solutions of ordinary dif eqs

• Jan 8th 2008, 01:22 AM
olionel
[SOLVED] Numerical solutions of ordinary dif eqs
Hello there;

I have a wee question, itd be great if I can get a solution for this. (I am putting it up on behalf of a friend as Im not really sure where to start, hes studying maths at uni.... Im a lazy engineer that asks mathemticians :) )

Thanks!

The question is

solve (1+x^2)y'' - xy'- 3y = 6x-3 with

y(0)-y'(0)=1

y(1)=2 on [0,1]

with h=0.2

hint: use central difference for each derivatives.
• Jan 8th 2008, 03:59 AM
mr fantastic
Quote:

Originally Posted by olionel
Hello there;

I have a wee question, itd be great if I can get a solution for this. (I am putting it up on behalf of a friend as Im not really sure where to start, hes studying maths at uni.... Im a lazy engineer that asks mathemticians :) )

Thanks!

The question is

solve (1+x^2)y'' - xy'- 3y = 6x-3 with

y(0)-y'(0)=1

y(1)=2 on [0,1]

with h=0.2

hint: use central difference for each derivatives.

Tell your friend to start by substituting the difference quotients

$y_i^{''} = \frac{y_{i+1} - 2y_i + y_{i-1}}{h^2}$

and

$y_i^{'} = \frac{y_{i+1} - y_{i-1}}{2h}$

into the ODE. Simplify the result to get a difference equation of the form $ay_{i+1} + by_i + cy_{i-1} = d$.

There are five (why?) unknowns: $y_0, y_1, y_2, y_3, y_4$. $y_5 = 2$ (why?)

Use the difference equation to obtain four equations involving these unknowns. And don't forget that $y_0 - y^{'}_0 = 1$ (why?). Set up the matrix equation representing these equations. Solve for the unknowns.
• Jan 8th 2008, 02:33 PM
ardaca
hi,

i am the friend of olionel :) call me lazy mathematician :P

mr fantastic, thanks for your reply ;) i got the result ;)

now i need to write it in Mathematica and plot the graphiscs ( approximate solution and exact solution ) anyhelp about Mathematica would be great ;)