Results 1 to 3 of 3

Math Help - Matlab problem - solving a simple differential equation

  1. #1
    Newbie
    Joined
    Mar 2010
    Posts
    2

    Matlab problem - solving a simple differential equation

    Hi!

    I have been stuck with Matlab all day trying to solve a differential equation. I have found several tutorials on this subject but still didn't manage to solve my equation.

    Please have a look at the attached pictures. I wrote down the diff equation and also made a scan of a print from Matlab of what I have written. The text on either sides of the line are in separate files.

    My problem: I want to get a solution for y but for some reason Matlab only gives the initial value of y (which is zero). It seems like it doesn't solve the equaiton.

    I wonder what I could have done wrong? Especially the region I marked with red.

    I would appreciate any feedback that could help me solve this, so I can go on with my work... :P

    /Anders
    Attached Thumbnails Attached Thumbnails Matlab problem - solving a simple differential equation-matlabscan.jpg   Matlab problem - solving a simple differential equation-matlabscan_formula.jpg  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Svenson View Post
    Hi!

    I have been stuck with Matlab all day trying to solve a differential equation. I have found several tutorials on this subject but still didn't manage to solve my equation.

    Please have a look at the attached pictures. I wrote down the diff equation and also made a scan of a print from Matlab of what I have written. The text on either sides of the line are in separate files.

    My problem: I want to get a solution for y but for some reason Matlab only gives the initial value of y (which is zero). It seems like it doesn't solve the equaiton.

    I wonder what I could have done wrong? Especially the region I marked with red.

    I would appreciate any feedback that could help me solve this, so I can go on with my work... :P

    /Anders
    You derivative function does not return the derivative vector.

    You have a differential equation of the form:

    \ddot{y}=f(t, \dot{y},y)

    You turn this into a first order system by introducing the state vector:

     <br />
\bold{y}=\left[ \begin{array}{c} y \\ \dot{y} \end{array}\right]<br />

    Then:

     <br />
\dot{\bold{y}}=\left[ \begin{array}{c} \dot{y} \\ f(t, \dot{y},y) \end{array}\right]<br />
<br />
\left[ \begin{array}{c} \bold{y}_2 \\ f(t, \bold{y}_2,\bold{y}_1) \end{array}\right]<br />

    It is ths \dot{\bold{y}} that your derivative function should be returning.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2010
    Posts
    2
    Thanks for the help! I forgot to reply...
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] I need help solving a simple differential equation?
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: September 14th 2010, 05:01 AM
  2. Solving a simple differential equation
    Posted in the Differential Equations Forum
    Replies: 6
    Last Post: January 13th 2010, 08:52 PM
  3. solving differential equations using laplace! simple problem
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: January 4th 2010, 07:46 AM
  4. Simple differential equation problem
    Posted in the Differential Equations Forum
    Replies: 4
    Last Post: April 13th 2009, 08:05 AM
  5. Simple differential equation problem
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: April 6th 2009, 05:38 PM

Search Tags


/mathhelpforum @mathhelpforum