Results 1 to 6 of 6
Like Tree3Thanks
  • 1 Post By romsek
  • 2 Post By romsek

Thread: Differential equations in Mathematica

  1. #1
    Super Member
    Joined
    Jun 2009
    From
    United States
    Posts
    683
    Thanks
    19

    Differential equations in Mathematica

    I attached a screen shot of my notebook. I'm using the DSolve function for a few simple diff eq to familiarize myself with the software. The first equation I entered worked fine. For some reason any other diff eqs I try to solve in the same notebook won't work. I tried changing the assignment of variables to (t,u) instead of (x,y) for the second diff eq to see if it had anything to do with previous use of (x,y) in the first equation. It still didn't work. What am I missing here?
    Attached Thumbnails Attached Thumbnails Differential equations in Mathematica-mathematica-issue-2.png  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    6,312
    Thanks
    2709

    Re: Differential equations in Mathematica

    You used = instead of == when defining the equation

    = is the set operation

    == is the equals query
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Jun 2009
    From
    United States
    Posts
    683
    Thanks
    19

    Re: Differential equations in Mathematica

    Quote Originally Posted by romsek View Post
    You used = instead of == when defining the equation

    = is the set operation

    == is the equals query
    Thanks for your response. I thought of that and tried it before and something's still wrong, I attached it. Also, when I use == and hit space bar it always combines them into one. I avoided that to leave it as == this time. It's still giving this weird error that I can't make any sense out of.

    Edit: Actually, in the screen shot I'm using (t,y) symbols (same is the first diff eq). It thinks I'm trying to call that first function. However, when I use (t,u) instead it still doesn't work. That's the second attachment.
    Attached Thumbnails Attached Thumbnails Differential equations in Mathematica-here-we-go-again.png   Differential equations in Mathematica-still-problem.png  
    Last edited by adkinsjr; Nov 9th 2018 at 09:46 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    6,312
    Thanks
    2709

    Re: Differential equations in Mathematica

    Did you fix the use of parens rather than brackets in the first line?

    It looks like that is royally confusing Mathematica.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    Joined
    Jun 2009
    From
    United States
    Posts
    683
    Thanks
    19

    Re: Differential equations in Mathematica

    Quote Originally Posted by romsek View Post
    Did you fix the use of parens rather than brackets in the first line?

    It looks like that is royally confusing Mathematica.
    I use brackets for the DSolve function. Strangely, it seems the issue may be the use of "u" as the function. If I replace "u" with "f," it works, which is puzzling.
    Attached Thumbnails Attached Thumbnails Differential equations in Mathematica-side-side.png  
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    6,312
    Thanks
    2709

    Re: Differential equations in Mathematica

    Look at the parens you are using for the Cos function. They are highlighted in red. That can't be what you meant to do.

    Also looking at this further you must have had u[x] defined at some earlier point. That's why Mathematica is able to
    evaluate 1-u'[x]==0 to False.

    Try putting Clear[u] above the DSolve line.

    Differential equations in Mathematica-clipboard01.jpg
    Last edited by romsek; Nov 10th 2018 at 05:34 AM.
    Thanks from adkinsjr and topsquark
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. partial differential equation with mathematica
    Posted in the Math Software Forum
    Replies: 5
    Last Post: Apr 27th 2014, 01:37 AM
  2. Differential equation mathematica
    Posted in the Math Software Forum
    Replies: 2
    Last Post: Nov 2nd 2010, 06:57 AM
  3. Differential Eqns in Mathematica help please
    Posted in the Math Software Forum
    Replies: 0
    Last Post: Apr 8th 2010, 09:21 PM
  4. Replies: 0
    Last Post: Apr 16th 2009, 08:23 AM
  5. Graphing a differential equation in mathematica?
    Posted in the Math Software Forum
    Replies: 0
    Last Post: Apr 7th 2009, 09:10 PM

/mathhelpforum @mathhelpforum