How do I enter a differential equation in maple?

In summary, the conversation is about a student struggling with entering a differential equation into Maple and asking for guidance. They have tried using the diff and dsolve commands, but have encountered errors due to incorrect formatting of the equation. They are advised to use the correct syntax and to refer to online tutorials for help. The student also explains their lack of prior programming experience and their reasons for taking the class. They are also recommended to check out tutorials on the Maplesoft website.
  • #1
mmont012
39
0
Hello,
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. Homework Statement

dydx+2x=2y

How do I enter this equation into maple?

Homework Equations

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.
 
Physics news on Phys.org
  • #2
mmont012 said:
Hello,
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. Homework Statement


dydx+2x=2y

How do I enter this equation into maple?

Homework Equations

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.

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/ .
 
  • #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 homework problems.
Thank you for the link to the tutorials.
 
  • #4
mmont012 said:
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 homework problems.
Thank you for the link to the tutorials.

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.
 

1. How do I enter a differential equation in Maple?

To enter a differential equation in Maple, use the "diff" command followed by the equation. For example, if your equation is dy/dx = 2x + 3, you would enter "diff(y(x), x) = 2x + 3" in Maple.

2. What if my differential equation has multiple variables?

If your differential equation has multiple variables, you can use the "diff" command for each variable. For example, if your equation is d^2y/dx^2 + 2dy/dx = 3x, you would enter "diff(y(x), x, x) + 2*diff(y(x), x) = 3x" in Maple.

3. Can I enter a system of differential equations in Maple?

Yes, you can enter a system of differential equations in Maple by using the "dsolve" command. This command allows you to enter multiple equations and solve for multiple variables simultaneously.

4. How do I specify initial conditions for my differential equation?

To specify initial conditions for your differential equation in Maple, use the "ics" command after the "dsolve" command. This allows you to enter the initial values for your variables.

5. Is there a specific format I need to follow when entering a differential equation in Maple?

Yes, when entering a differential equation in Maple, make sure to use proper mathematical notation and follow the syntax rules of the "diff" and "dsolve" commands. You can refer to the Maple help documentation for more detailed instructions and examples.

Similar threads

  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
857
  • Calculus and Beyond Homework Help
Replies
2
Views
546
  • Calculus and Beyond Homework Help
Replies
7
Views
505
  • Calculus and Beyond Homework Help
Replies
10
Views
482
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
681
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
574
Back
Top