Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

DSolve bug: wrong explicit solutions

  • To: MATHGROUP at yoda.physics.unc.edu
  • Subject: DSolve bug: wrong explicit solutions
  • From: <Constantin.Kahn at cdc2.c.mathematik.uni-hannover.dbp.de>
  • Date: 15 Feb 92 15:16

Hi,

the following Mma session (Mma 2.0.3 for Macintosh) demonstrates a pretty
serious bug in Mma's DSolve command which causes it to return a wrong
explicit solution for a simple system of two first order differential
equations involving only trigonometric functions. So always check those
results! (There is also a problem with Simplify which does not do quite the
expected thing...)

For your information: This system of differential equations arises in
differential geometry if you try to compute the parallel transport of a
tangent vector along the central curve in a Moebius strip (which is embedded
into 3-dim'l affine space such that its boundary lies on a torus and forms a
torus knot of type (2,1); obvious parametrization).

This bug has been reported to bugs at wri.com.

Regards,

Constantin Kahn, Inst. f. Mathematik, Univ. Hannover, Germany

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(* Mathematica session follows. Output cells are shown indented. *)

$Version

   "Macintosh 2.0 (September 3, 1991)"

solution =
  DSolve[ { a'[t] - Cos[t] b[t] == 0,
            b'[t] + Cos[t] a[t] == 0,
            a[0] == 0, b[0] == 1 },
          { a[t], b[t] }, t ]

   {{a[t] -> I/2*E^(-I*t*Cos[t]) - I/2*E^(I*t*Cos[t]),
      b[t] -> E^(-I*t*Cos[t])/2 + E^(I*t*Cos[t])/2}}

(* This is not a solution! (See below.) Mathematica's Simplify command
also isn't very smart in this case: *)

Simplify[ solution ]

   {{a[t] -> I/2*E^(-I*t*Cos[t]) - I/2*E^(I*t*Cos[t]),
      b[t] -> E^(-I*t*Cos[t])/2 + E^(I*t*Cos[t])/2}}

A[t_] := Sin[t Cos[t]];
B[t_] := Cos[t Cos[t]];

Simplify[ { A[t] - (a[t]/.solution),
            B[t] - (b[t]/.solution) } ]

   {{0}, {0}}

(* So A[t] and B[t] are what the functions obtained as solutions
really are. Let's see whether they actually solve the differential
equations. *)

errorA = D[A[t],t] - Cos[t] B[t];
errorB = D[B[t],t] + Cos[t] A[t];

Simplify[ { errorA, errorB } ]

   {-(t*(Sin[2*t*Cos[t/2]^2] + Sin[2*t*Sin[t/2]^2]))/2,
      (t*(-Cos[2*t*Cos[t/2]^2] + Cos[2*t*Sin[t/2]^2]))/2}

Plot[ errorA, {t,0,2Pi} ];
Plot[ errorB, {t,0,2Pi} ];

(* end of Mathematica session transcript *)













  • Prev by Date: joining mathgroup
  • Next by Date: Mathematica Postscript and TIFF
  • Previous by thread: joining mathgroup
  • Next by thread: Mathematica Postscript and TIFF