Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Initial conditions for an ODE

  1. Dec 8, 2017 #1

    SeM

    User Avatar

    Hi, I am trying to solve an ODE, however, the initial conditions are not known. From PDE examples, which are quite different, I see that some examples have initial conditions given by functions, and not by constants, i.e::

    y(0) = x^2

    I may have not modeled the problem correctly yet, however, I see that the inhomogenous ODE should have a condition which is as such:

    y(0) = cos(x)

    MATLAB can't do it. Is it something that can't be done at all?

    Thanks!
     
  2. jcsd
  3. Dec 8, 2017 #2

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Do we have to guess what ODE ? Why don't you post it ?
     
  4. Dec 8, 2017 #3

    SeM

    User Avatar

    y'' + iy' = 0
     
  5. Dec 8, 2017 #4

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    In other words, y(0) = 1 ?

    (your ODE doesn't look inhomogeneous to me at all ?!)
     
  6. Dec 8, 2017 #5

    SeM

    User Avatar

    Thanks, I think that explains it. I see this is a PDE not an ODE I want to solve. Cheers (y(0)=cos(theta)
     
  7. Dec 8, 2017 #6

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Don't see no partial differential either. Is it me ?
     
  8. Dec 8, 2017 #7

    SeM

    User Avatar

    It's not you, don't worry. It's me who is horribly wrong here.
     
  9. Dec 8, 2017 #8

    Mark44

    Staff: Mentor

    y appears to be a function of a single variable, so the above is an ODE. BTW, the solution I get, without considering an initial condition, is ##y = -\frac i C e^{-it} + D = -\frac i C (\cos(t) - i\sin(t)) + D##.
     
  10. Dec 8, 2017 #9

    SeM

    User Avatar

    Thanks Mark!

    Cheers
     
  11. Dec 8, 2017 #10

    mfb

    User Avatar
    2017 Award

    Staff: Mentor

    As C is an arbitrary constant anyway, this can be written shorter as ##y=Ce^{-it} + D##.
     
  12. Dec 8, 2017 #11

    Mark44

    Staff: Mentor

    Right. I thought of this, but didn't let i be absorbed into the constant, so as to make things a bit clearer.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted