Need help solving/graphing diff eqs with Maple

  • Maple
  • Thread starter PICsmith
  • Start date
  • Tags
    Maple
In summary, Vladimir used the following syntax to solve for x and y:restart:with(DEtools):with(plots):b:=(0.8*1.3*0.2)/(2*30);g:=9.8;sys = {diff(x(t),t$2) = -b*diff(x(t),t)*sqrt( (diff(x(t),t))^2 + (diff(y(t),t))^2), diff(y(t),t$2) = -b*diff(y(t),t)*sqrt( (diff(x(t),t))^2 +
  • #1
PICsmith
54
0
Hi everyone, first time poster here. I'm hoping someone who's familiar with Maple can help me solve this problem from Classical Dynamics of Particles and Systems, Thornton/Marion, 5th ed., Chap 2, number 7. I have the solutions manual which contains this problem, and I can get to where they get to, these 2 parametric equations:

[tex]
\ddot{x}=-b \dot{x} \sqrt{ \dot{x}^2+ \dot{y}^2}
[/tex]
[tex]
\ddot{y}=-b \dot{y} \sqrt{ \dot{x}^2+ \dot{y}^2}-g
[/tex]
(in case LaTeX doesn't work:
x'' = -bx' sqrt((x' )^2 + (y' )^2);
y'' = -by' sqrt((x' )^2 + (y' )^2) - g;)
where b is all the constants

Then they say "solving with a computer using given values...we arrive at these nice graphs here" without bothering to say what steps were needed to do so. I've tried to use Maple to solve for x(t) and y(t) and graph them with no success. Here's how far I get:

> restart:with(DEtools):with(plots):
I assign all the constants their values
> b:=(0.8*1.3*0.2)/(2*30);g:=9.8;
I assign both of the diff eqs to variables, and the output (just what i put in, in pretty symbolic form) is correct
> XDD:= diff(x(t),t$2) = -b*diff(x(t),t)*sqrt( (diff(x(t),t))^2 + (diff(y(t),t))^2);
> YDD:= diff(y(t),t$2) = -b*diff(y(t),t)*sqrt( (diff(x(t),t))^2 + (diff(y(t),t))^2)-g;
Then I assign the solution to another variable for each one (with initial conditions):
> SX:=dsolve({XDD,x(0)=-210,D(x)(0)=44.44},x(t));
> SY:=dsolve({YDD,y(0)=80,D(y)(0)=0},y(t));

but the output in both cases is just:
SX:=
SY:=
Empty, no errors though. Now if I remove the initial condition for the velocity at t=0, I do get an output, albeit an ugly one, but it doesn't make a graph, not that I expected it to. I tried to plot parametrically:
plot([SX,SY,t=0..4.44],x=-200..-30,y=0..80);

I think my problem is that both equations are in terms of each other, x(t) and y(t), and can't be solved thus with dsolve( ). Any advise would be appreciated, and this not an assigned problem for school for me although it was last year (I never turned in the graph) so I'm posting here in the HW help section. Thanks.
 
Physics news on Phys.org
  • #2
hi
have u tried having a look at the following section in the maple help file
>help
>mathematics
>differential equations
>dsolve
>system
it might prove to be useful in some way
 
  • #3
solved!

Cool beans, I solved it :smile: Thanks for pointing me in the right direction vladimir. For anyone who might have a similar problem for Maple here is the syntax I used:

> restart:with(DEtools):with(plots):b:=(0.8*1.3*0.2)/(2*30);g:=9.8;

sys = {diffeq1, diffeq2, initial conditions...}
> sys:={diff(x(t),t$2) = -b*diff(x(t),t)*sqrt( (diff(x(t),t))^2 + (diff(y(t),t))^2), diff(y(t),t$2) = -b*diff(y(t),t)*sqrt( (diff(x(t),t))^2 + (diff(y(t),t))^2)-g, x(0)=-210,D(x)(0)=44.44,y(0)=80,D(y)(0)=0};

> fcns:=[x(t), y(t)]:

> soln:=dsolve(sys, type=numeric, range=0..4.44);

> odeplot(soln, fcns);
 

1. What is Maple and how can it help with solving differential equations?

Maple is a computer algebra system that is specifically designed for mathematical calculations and problem-solving. It has a built-in functionality for solving and graphing differential equations, making it a useful tool for scientists and engineers.

2. How do I input a differential equation into Maple?

To input a differential equation into Maple, you can use the "dsolve" command followed by the equation in the format "dy/dx = f(x,y)". Alternatively, you can use the "DEtools" package which allows you to input the equation in a more intuitive way.

3. Can Maple solve any type of differential equation?

No, Maple has its limitations and may not be able to solve every type of differential equation. However, it can handle a wide range of equations including first-order, second-order, and systems of differential equations.

4. How can I graph the solution of a differential equation using Maple?

To graph the solution of a differential equation in Maple, you can use the "DEplot" command. This function allows you to specify the range of values for the independent variable and the initial conditions for the dependent variables.

5. Are there any tutorials or resources available for learning how to use Maple for solving differential equations?

Yes, there are many online tutorials and resources available for learning how to use Maple for solving differential equations. Maple also has a built-in help function that provides detailed information and examples for using its differential equation solving capabilities.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
991
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
996
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
873
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
619
  • Calculus and Beyond Homework Help
Replies
2
Views
156
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
Back
Top