Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7521 > unrolled thread
| Started by | Sam Takoy <sam.takoy@yahoo.com> |
|---|---|
| First post | 2012-01-02 07:44 +0000 |
| Last post | 2012-01-03 10:28 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
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
| From | Sam Takoy <sam.takoy@yahoo.com> |
|---|---|
| Date | 2012-01-02 07:44 +0000 |
| Subject | Surprising DSolve problem |
| Message-ID | <jdrn85$8sr$1@smc.vnet.net> |
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
[toc] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2012-01-03 10:28 +0000 |
| Message-ID | <jdul8o$joo$1@smc.vnet.net> |
| In reply to | #7521 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web