3
$\begingroup$

New to Mathematica, trying to solve a set of coupled differential equations related to a geodesics/Calculus of Variations problem. More specifically, I am trying to solve the two Euler-Lagrange equations minimizing the arc length of a curve along the unit sphere.

\begin{align} \frac{\partial L}{\partial u} - \frac{d}{dt}\frac{\partial L}{\partial \dot{u}} = 0 \\[10pt] \frac{\partial L}{\partial v} - \frac{d}{dt}\frac{\partial L}{\partial \dot{v}} = 0 \end{align}

where L is the Lagrangian of the arc-length functional for a curve along a sphere parameterized by $(u,v)$:

\begin{align} L(\xi,\dot{\xi}) = \sqrt{\cos^2(v)\dot{u}^2 + 1} \end{align}

The resulting differential equation is:

{(2 Cos[v[t]] Sin[v[t]] Derivative[1][u][t] Derivative[1][v][t])/Sqrt[
   1 + Cos[v[t]]^2 Derivative[1][u][t]^2] - (
   Cos[v[t]]^2 (u^\[Prime]\[Prime])[t])/Sqrt[
   1 + Cos[v[t]]^2 Derivative[1][u][
      t]^2] + (Cos[v[t]]^2 Derivative[1][u][
       t] (-2 Cos[v[t]] Sin[v[t]] Derivative[1][u][t]^2 Derivative[1][
          v][t] + 2 Cos[v[t]]^2 Derivative[1][u][t] (
          u^\[Prime]\[Prime])[t]))/(2 (1 + 
        Cos[v[t]]^2 Derivative[1][u][t]^2)^(3/2)) == 
  0, -((Cos[v[t]] Sin[v[t]] Derivative[1][u][t]^2)/Sqrt[
   1 + Cos[v[t]]^2 Derivative[1][u][t]^2]) == 0}

And the DSolve expression is:

DSolve[{(2 Cos[v[t]] Sin[v[t]] Derivative[1][u][t] Derivative[1][v][
      t])/Sqrt[1 + Cos[v[t]]^2 Derivative[1][u][t]^2] - (
    Cos[v[t]]^2 (u^\[Prime]\[Prime])[t])/Sqrt[
    1 + Cos[v[t]]^2 Derivative[1][u][
       t]^2] + (Cos[v[t]]^2 Derivative[1][u][
        t] (-2 Cos[v[t]] Sin[v[t]] Derivative[1][u][t]^2 Derivative[
           1][v][t] + 
         2 Cos[v[t]]^2 Derivative[1][u][t] (u^\[Prime]\[Prime])[
           t]))/(2 (1 + Cos[v[t]]^2 Derivative[1][u][t]^2)^(3/2)) == 
   0, -((Cos[v[t]] Sin[v[t]] Derivative[1][u][t]^2)/Sqrt[
    1 + Cos[v[t]]^2 Derivative[1][u][t]^2]) == 0}, {v[t], u[t]}, t]

I seem to have two (possibly unsolvable) equations with two variables each defined by the parameter t. And yet Mathematica returns a "Solve::svars: Equations may not give solutions for all "solve" variables" error. The equation doesn't seem underspecified, and I'd expect an "equation cannot be solved with methods available to DSolve" error if it were simply unsolvable. Am I missing something?

Thanks!

enter image description here

$\endgroup$
  • $\begingroup$ The problem seems to be the last equation, which generically implies u'[t] == 0; which in turn implies u''[t] = 0 and the system is satisfied by any v[t] as long as u[t] is constant. $\endgroup$ – Michael E2 Apr 12 '16 at 22:20
  • $\begingroup$ Thank you very much for this. That really should have been obvious to me, in part because it's the answer I was expecting. This is the geodesic minimization problem on a sphere, and the solution curve should be one of the so-called great circles of the sphere, characterized by a constant polar angle. Wikipedia literally says: "Since the starting point and ending point are fixed, S is minimized if and only if φ' = 0, so the curve must lie on a meridian of the sphere φ = φ0 = constant." So it all makes sense. $\endgroup$ – JAustin Apr 12 '16 at 22:51
3
$\begingroup$

DSolve rewrites the system as a system of first order equations and then tries to Solve for the derivatives.

One can see the Solve command DSolve calls by using Trace as follows:

Trace[
 DSolve[{(2 Cos[v[t]] Sin[v[t]] Derivative[1][u][t] Derivative[1][v][
         t])/Sqrt[
       1 + Cos[v[t]]^2 Derivative[1][u][t]^2] - (Cos[v[t]]^2 u''[t])/
      Sqrt[1 + 
        Cos[v[t]]^2 Derivative[1][u][t]^2] + (Cos[
          v[t]]^2 Derivative[1][u][
         t] (-2 Cos[v[t]] Sin[
            v[t]] Derivative[1][u][t]^2 Derivative[1][v][t] + 
          2 Cos[v[t]]^2 Derivative[1][u][t] u''[t]))/(2 (1 + 
           Cos[v[t]]^2 Derivative[1][u][t]^2)^(3/2)) == 
    0, -((Cos[v[t]] Sin[v[t]] Derivative[1][u][t]^2)/
       Sqrt[1 + Cos[v[t]]^2 Derivative[1][u][t]^2]) == 0}, {v[t], 
   u[t]}, t],
 _Solve,
 TraceInternal -> True]

The Solve command is as follows (possibly with different local variables):

Solve[{-((Cos[v[t]]^2 Derivative[1][NDSolve`u$1][t])/Sqrt[
         1 + Cos[v[t]]^2 NDSolve`u$1[t]^2]) + (
    2 Cos[v[t]] Sin[v[t]] NDSolve`u$1[t] Derivative[1][v][t])/Sqrt[
        1 + Cos[v[t]]^2 NDSolve`u$1[
       t]^2] + (Cos[v[t]]^2 NDSolve`u$1[
            t] (2 Cos[v[t]]^2 NDSolve`u$1[t] Derivative[1][NDSolve`u$1][
           t] - 2 Cos[v[t]] Sin[v[t]] NDSolve`u$1[t]^2 Derivative[1][
               v][t]))/(2 (1 + Cos[v[t]]^2 NDSolve`u$1[t]^2)^(3/2)) == 
   0, -((Cos[v[t]] Sin[v[t]] NDSolve`u$1[t]^2)/Sqrt[
        1 + Cos[v[t]]^2 NDSolve`u$1[t]^2]) == 0, 
  Derivative[1][u][t] == NDSolve`u$1[t]}, {Derivative[1][u][t], 
      Derivative[1][NDSolve`u$1][t], Derivative[1][v][t]}]

Solve::svars: Equations may not give solutions for all "solve" variables. >>

(*
  {{Derivative[1][u][t] -> NDSolve`u$1[t], 
        Derivative[1][NDSolve`u$1][t] -> 0}}
*)

The solution returned is incomplete and unusable by DSolve, so DSolve quits. I suppose it would be nicer if it caught the error message and reissued a message more easily understood by the user.

(The source of the problem seems to be the last equation in the OP's system, which generically implies u'[t] == 0. This in turn implies u''[t] = 0. By plugging these values into the system, one can see that v[t] can be any function as long as u[t] is constant.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.