Maple Solving Differential Equations in Maple

AI Thread Summary
The discussion focuses on solving a differential equation in Maple with specific initial conditions. The equation presented is θ''(t) + 4π² sin(θ(t)) = 0, with initial conditions θ(0) = A and θ'(0) = B. Users suggest using the dsolve command with the correct syntax for initial conditions, including the D operator for derivatives. One participant provides a functional command that evaluates the solution numerically with specified initial conditions. The conversation emphasizes the importance of proper syntax and the utility of the D operator in Maple for solving differential equations.
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:

\theta(t)''+4\pi^2 sin(\theta(t))=0, with \theta(0)=A and \theta'(0)=B 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: 594

Similar threads

Back
Top