Solving Differential Equations in Maple

Click For Summary

Discussion Overview

The discussion revolves around solving a specific second-order differential equation in Maple, particularly focusing on setting initial conditions for the equation. Participants explore various methods to implement the solution numerically, addressing both syntax and functionality within the Maple software.

Discussion Character

  • Technical explanation, Homework-related

Main Points Raised

  • One participant presents a differential equation and expresses difficulty in setting initial conditions using Maple's dsolve function.
  • Another participant suggests a function definition that utilizes the D operator for derivatives, proposing a way to solve the equation with initial conditions.
  • A third participant shares their approach, noting that while it may not yield a "nice" solution, it is functional, and suggests substituting specific values for initial conditions to potentially enhance the output.
  • A later reply acknowledges the utility of the D operator over the diff function, expressing gratitude for the shared insights.

Areas of Agreement / Disagreement

Participants do not appear to reach a consensus on a single method for solving the equation, as multiple approaches are discussed, each with its own merits and limitations.

Contextual Notes

Some limitations include the potential for unclear outputs when using symbolic constants for initial conditions, and the varying effectiveness of different operators in Maple for solving differential equations.

Who May Find This Useful

This discussion may be useful for students and practitioners working with differential equations in Maple, particularly those seeking guidance on setting initial conditions and using different operators for numerical solutions.

juef
Messages
27
Reaction score
0
Hey all,

I'm having trouble setting initial conditions when solving differential equations in Maple. Here's the equation:

[tex]\theta(t)''+4\pi^2 sin(\theta(t))=0[/tex], with [tex]\theta(0)=A[/tex] and [tex]\theta'(0)=B[/tex] as initial conditions.

I'd like to solve it with a command like:
solution:=dsolve({diff(theta(t), t, t) + 4*Pi*sin(theta(t)=0, init_conds},theta(t),numeric,range=0..4);

with something like:
init_conds:={theta(0)=A, diff(theta, t)=B);

But it seems Maple doesn't like my way of doing things... I've searched the help file, but couldn't find one that suits my problem.

Anyone? o:) Thank you!
 
Physics news on Phys.org
Try this:

dsol:=(A,B)->dsolve({(D@@2)(theta)(t)+4*Pi^2*sin(theta(t)), theta(0)=A, D(theta)(0)=B}, numeric);

then the command

dsol(a,b)(T);

will evaluate the solution with ICs A = a, B = b, at t = T.
 
here is what i did
doesnt give u a nice solution but it works nonetheless
(student):
diff(theta(t),t,t)+4*Pi*Pi*sin(theta(t))=0;
dsolve({%,theta(0)=A,D(theta)(0)=B},theta(t));

perhaps if u plugged in some values instead of "A" and "B" it might give u something more exciting
 
Man, I didn't know about that D operator, the only thing I used was diff. Your help is extremely appreciated. Thanks a bunch both of you! See my appreciation in the attachment! :smile:
 

Attachments

  • Sans titre.GIF
    Sans titre.GIF
    6 KB · Views: 629

Similar threads

Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K