The basic problem of this formulation is another differential equation added instead of appropriate initial conditions, namely we shoud have a condition for e.g. s'[0]
instead of equation for s'[t]
. Moreover, it is not quite clear whether we deal with a projectile motion or with a mathematical pendulum. Next, it appears in the both cases there are wrong signs of the force terms
At this point we should decide what is our dependent variable θ
or s
. If we prescribe well posed initial conditions it works well (here θ
is constant in case of the projectile problem):
s[t] /. DSolve[{s''[t] == -g Sin[θ], s[0] == 0,
s'[0]^2 == 2 g l Cos[θ]}, s[t], t] // Simplify
{ -Sqrt[2] Sqrt[g] Sqrt[l] t Sqrt[Cos[θ]] + 1/2 g t^2 Sin[θ],
Sqrt[2] Sqrt[g] Sqrt[l] t Sqrt[Cos[θ]] + 1/2 g t^2 Sin[θ]}
also assuming an appropriate initlal condition in case of a pendulum
θ[t] /. First @ DSolve[{θ''[t] == - g/l Sin[θ[t]], θ[0] == 0, θ'[0] == Sqrt[2 En]},
θ[t], t]
2 JacobiAmplitude[(Sqrt[En] t)/Sqrt[2], ((2 g)/(En l))]
En
is an integration constant chosen as an equivalent of the total energy of the pendulum, $E_n=\frac{E}{m\; l^2}$. I should have added this constant in such a form since otherwise DSolve
refuses to solve this problem.
The result is in terms of a special elliptic function, this can be reformulated in terms of e.g. JacobiSN
etc:
Through @ { Sin, Cos, Tan, Cot, Csc, Sec} @ JacobiAmplitude[u, m]
{ JacobiSN[u, m], JacobiCN[u, m], JacobiSC[u, m],
JacobiCS[u, m], JacobiNS[u, m], JacobiNC[u, m]}
This is an exact solution of the pendulum problem, without assumption of the small amplitude. When small amplitudes are considered then trigonometric functions appear to be good approximations of solutions. For comparison we evaluate
θ[t] /. DSolve[{ θ''[t] == - g/l θ[t], θ[0] == 0, θ'[0] == Sqrt[2 En]},
θ[t], t]
{(Sqrt[2] Sqrt[En] Sqrt[l] Sin[(Sqrt[g] t)/Sqrt[l]])/Sqrt[g]}
Taking arbitrary constants of motion we demonstrate the dfifference between exact solution and its approximation by linearizing the differential equation.
With[{En = 8, g = 10, l = 1},
Plot[{ Sin[2 JacobiAmplitude[(Sqrt[En] t)/Sqrt[2], (2 g)/(En l)]],
(Sqrt[2] Sqrt[En] Sqrt[l] Sin[(Sqrt[g] t)/Sqrt[l]])/Sqrt[g]},
{t, 0, 6}, PlotStyle -> Thick, WorkingPrecision -> 10, PlotLegends -> "Expressions"]]

The difference is significant for large amplitudes, while taking e.g. En = 2
solutions are very close. Finding the amplitudes in the both cases is left for the reader.
s'[0] == Sqrt[2 g l Cos[\[Theta]]]
$\endgroup$ – Daniel Lichtblau Mar 30 '20 at 14:11s'[0]==0
. $\endgroup$ – kile Mar 31 '20 at 1:04\[Theta]=Pi/2
$\endgroup$ – kile Mar 31 '20 at 1:09s'[t]' and
s''[t]` unless they are compatible. As written in the post, they are not, and moreover it is short by one initial condition. $\endgroup$ – Daniel Lichtblau Mar 31 '20 at 14:53