Re: Wierdness with the laplacian
- To: mathgroup at smc.vnet.net
- Subject: [mg45150] Re: [mg45132] Wierdness with the laplacian
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 18 Dec 2003 06:55:25 -0500 (EST)
- References: <200312171254.HAA07634@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 17 Dec 2003, at 21:54, Peter Jay Salzman wrote:
> Hi all,
>
> When I do:
>
> <<Calculus`VectorAnalysis`
> SetCoordinates[Spherical[r, theta, phi]
> Laplacian[ Exp[r^2] ]
>
> Mathematica gives:
>
> 2 2
> r 2 r 4
> Csc[theta] (6 E r Sin[theta] + 4 E r Sin[theta])
> ------------------------------------------------------
> 2
> r
>
> Which is wrong since Exp[r^2] is not a function of theta or phi.
>
>
> Why is Mathematica giving this result?
>
> Thanks!
> Pete
>
>
Actually it is perfectly O.K. In fact the answer depends only on r.
Simplify[Laplacian[E^r^2, Spherical[r, theta, phi]]]
2*E^r^2*(2*r^2 + 3)
In case this is still not clear: in the package Laplacian is defined in
Cartesion coordinates, so Mathematica converts your expression to
Cartesian coordinates, then computes the Laplacian and then converts
back to spherical coordinates. In other words, what it does is
essentially:
Simplify[Laplacian[Exp[x^2 + y^2 + z^2], Cartesian[x, y, z]] /.
Thread[{x, y, z} -> CoordinatesToCartesian[{r, theta, phi},
Spherical]]]
2*E^r^2*(2*r^2 + 3)
Andrzej Kozlowski
- References:
- Wierdness with the laplacian
- From: Peter Jay Salzman <p@dirac.org>
- Wierdness with the laplacian