Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.9K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Pendulum differential equation not computing using DSolve in Mathematica?

Posted 6 years ago

Just playing around with features of DSolve in Mathematica and came across a differential equation that DSolve is not able to handle for some reason. Hoping that someone knows why or a workaround for it.

Defined the pendulum differential equation:

eqn1[g_, R_, t_] = D[\[Phi][t], {t, 2}] + g/R*Sin[ \[Phi][t] ] == 0;

Defined parametric initial conditions:

ic[\[Alpha]_, \[Gamma]_] = List[
   \[Phi][0] == \[Alpha],
   \[Phi]'[t] == \[Gamma] /. {  t -> 0  }
   ];

Defined solution:

sol1[g_, R_, \[Alpha]_, \[Gamma]_, t_] = 
 DSolve[  {  eqn1[g, R, t], ic[\[Alpha], \[Gamma]] }, \[Phi][t], t  ]

For some reason, DSolve cannot handle this differential equation (while it is a deceivingly difficult differential equation, it pops up quite commonly in many different physical systems). The error output when running the solution is:

During evaluation of In[3]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

During evaluation of In[3]:= DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.

During evaluation of In[3]:= DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.

Out[3]= {}

Has anyone else encountered this with DSolve? Exact solutions to the pendulum differential equation do exist, and initial conditions have been specified to clarify constants in the solution for DSolve. It is unclear to me why this schema is not working to obtain a Mathematica function solution for the pendulum problem.

POSTED BY: Tim Kirkpatrick
3 Replies

"DSolve is not able to handle for some reason", because you have a Transcendental equation.

For general parameters DSolve can't do, because Math can't do.

Try:

 eqn1[g_, R_, t_] = D[\[Phi][t], {t, 2}] + g/R*Sin[\[Phi][t]] == 0;

 ic[\[Alpha]_, \[Gamma]_] = List[
         \[Phi][0] == \[Alpha],
         \[Phi]'[t] == \[Gamma] /. {  t -> 0  }];

      Internal`InheritedBlock[{Solve}, Unprotect[Solve];
        Solve[x___] := 
         Block[{$guard = True}, Print["Solve called : ", HoldForm[Solve[x]]];
           Solve[x]] /; ! TrueQ[$guard];
        DSolve[{eqn1[g, R, t], ic[\[Alpha], \[Gamma]]}, \[Phi][t], t]];

last line:

  (*Solve[{-\[Alpha]-2 JacobiAmplitude[(Sqrt[2 g+R Subscript[\[ConstantC], 1]] Subscript[\[ConstantC], 2])/(2 Sqrt[R]),(4 g)/(2 g+R Subscript[\[ConstantC], 1])]==0,(-Sqrt[R] \[Gamma]-Sqrt[2 g+R Subscript[\[ConstantC], 1]] JacobiDN[(Sqrt[2 g+R Subscript[\[ConstantC], 1]] Subscript[\[ConstantC], 2])/(2 Sqrt[R]),(4 g)/(2 g+R Subscript[\[ConstantC], 1])])/Sqrt[R]==0},{Subscript[\[ConstantC], 1],Subscript[\[ConstantC], 2]},VerifySolutions->True]*)

With initial angles:

   eqn1[g_, R_, t_] = 
    D[\[Phi][t], {t, 2}] + g/R*Sin[\[Phi][t]] == 0; ic = 
    List[\[Phi][0] == \[Pi]/2, \[Phi]'[t] == 
       0 /. {t -> 0}]; DSolve[{eqn1[g, R, t], ic}, \[Phi][t], t]
POSTED BY: Mariusz Iwaniuk
POSTED BY: Tim Kirkpatrick
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard