1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Maple, anyone?

  1. Mar 12, 2005 #1
    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!!
     
  2. jcsd
  3. Mar 12, 2005 #2
    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.
     
  4. Mar 13, 2005 #3
    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
     
  5. Mar 13, 2005 #4
    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:
     

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Maple, anyone?
  1. Anyone good at Maple? (Replies: 2)

Loading...