How do I enter a differential equation in maple?

  • #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.
 

Similar threads

Replies
10
Views
1K
Replies
10
Views
1K
Replies
2
Views
900
Replies
7
Views
2K
Back
Top