1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How do I enter a differential equation in maple?

  1. Sep 15, 2016 #1
    I am currently taking ODE's and the class has an optional lab to accompany it. So far in the lab we've been doing some pretty basic stuff. But we've finally moved on to entering in differential equations, and I'm confused.

    1. The problem statement, all variables and given/known data


    How do I enter this equation in to maple?

    2. Relevant equations

    3. The attempt at a solution
    I've tried
    de1:=diff(y(x), x) +2x=2y;
    Which gives me d/dx*y(x) +2x=2y

    This isn't correct because it's not like the original problem.

    Then I tried to solve it
    dsolve(de1) ;

    And it gave me an error message saying that I can't have y(x) in the same equation as y.

    Any guidance will be extremely helpful. This is my first go at a programming language, so I'm not very familiar with a lot of things.
  2. jcsd
  3. Sep 15, 2016 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You need to write ##y(x)## everywhere, not just in the derivative. Also, 2x is un-interpretable; you need 2*x, etc. (Maple just thinks 2x is some object with a weird name '2x'; it does not know you mean 2 times x.) So, you need
    de: diff(y(x),x) + 2*x =2*y(x);

    You should not just sit down and try to use any sophisticated computer package with 0 background. At least look at some of the introductory tutorials on-line, such as http://www.math.tamu.edu/~dallen/Maple_Tutorial/ .
  4. Sep 15, 2016 #3
    Thank you for your reply. Once I get to school tomorrow I will try it out.
    As for not having experience before this class, no prior knowledge in programming was necessary to take it. The reason that I decided to enroll in it, is because I thought that it would help me have a better understanding of the material from the lecture and with visualizing what is happening in the hw problems.
    Thank you for the link to the tutorials.
  5. Sep 15, 2016 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You should also go to the Maplesoft website and look at (or download) the many, many free tutorials available there.

    There are some more-or-less minor differences between some of the commands/methods between different releases of Maple, but the underlying basics have remained almost the same from Maple V onward. I think that most of the time if you are using an instruction that has become obsolete, Maple will give you a message to that effect.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted