Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7542

Re: Surprising DSolve problem

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Surprising DSolve problem
Date 2012-01-03 10:28 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jdul8o$joo$1@smc.vnet.net> (permalink)
References <jdrn85$8sr$1@smc.vnet.net>

Show all headers | View raw


On 1/2/2012 1:44 AM, Sam Takoy wrote:
> Hi,
>
> I find that my Mathematica (8.0.1)
>
> can do
>
> DSolve[ y''[x] + (2 y[x])/(Cosh[x]^2) == 0, y, x]
>
> but can't do
>
> DSolve[ y''[x] + (2 y[x])/(a^2 Cosh[x/a]^2) == 0, y, x] (*Additional
> constant "a")
>
> If I am not mistaken, the equations are equivalent by a trivial change
> of variables.
>
> What's going on here?
>
> Thanks,
>
> Sam
>

Not sure why but when 'a' is an integer, it is not happy. So this is a way
around it, just add a

                1.0*a

in place of

                  a

in the DSolve, and now it goes through:

-----------------------------------
DSolve[y''[x] + (2 y[x])/(a^2 Cosh[x/(1.0*a)]^2) == 0, y, x]
--------------------------------------------

To make sure I had the solution as

DSolve[ y''[x] + (2 y[x])/(Cosh[x]^2) == 0, y, x]

(Which you say should be the same), I did gave both the
some initial conditions, and plotted the solution
for some random values of 'a', like this:

---------------------------------
ClearAll[y, x, a];
sol1 = y[x] /.
   First@DSolve[{y''[x] + (2 y[x])/(a^2 Cosh[x/(1.0*a)]^2) == 0,
      y[0] == 0, y'[0] == 1}, y[x], x];
-----------------------------------

which gave:

(1. Sqrt[1. -1. Sech[x/a]^2])/Sqrt[1/a^2]

Now plot it

------------------------------
Plot[sol1 /. a -> RandomInteger[10], {x, -.02, .02}, PlotRange -> All]
------------------------------

But when I plot the second solution, for the same range, they
are not the same. (Are sure that adding an 'a' will make
no difference?)

------------------------------------
sol2 = y[x] /.
   First@DSolve[{y''[x] + (2 y[x])/(Cosh[x]^2) == 0, y[0] == 0,
      y'[0] == 1}, y[x], x]
-----------------------------------

Which gave

Tanh[x]

Plot[sol2, {x, -.01, .01}]

does not give the same solution shape.

Tanh[x] =!= (1. Sqrt[1. -1. Sech[x/a]^2])/Sqrt[1/a^2]
for any 'a'.

so, The 2 differential equations do not appear to be the same?
What change of variables will make them the same for any 'a' ?

--Nasser


Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Surprising DSolve problem Sam Takoy <sam.takoy@yahoo.com> - 2012-01-02 07:44 +0000
  Re: Surprising DSolve problem "Nasser M. Abbasi" <nma@12000.org> - 2012-01-03 10:28 +0000

csiph-web