       Re: Yukawa

• To: mathgroup at smc.vnet.net
• Subject: [mg54815] Re: Yukawa
• From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
• Date: Wed, 2 Mar 2005 22:29:05 -0500 (EST)
• Organization: Uni Leipzig
• References: <d03o8d\$8ab\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

especial you was not so clever to send us your code,
so, we will never find out why your code does not work
However

deqn={Derivative[px][t] ==
(g*x[t])/(E^(K*Sqrt[x[t]^2 + y[t]^2])*
(x[t]^2 + y[t]^2)^(3/2)) +
(g*K*x[t])/(E^(K*Sqrt[x[t]^2 + y[t]^2])*
(x[t]^2 + y[t]^2)), Derivative[py][t] ==
(g*y[t])/(E^(K*Sqrt[x[t]^2 + y[t]^2])*
(x[t]^2 + y[t]^2)^(3/2)) +
(g*K*y[t])/(E^(K*Sqrt[x[t]^2 + y[t]^2])*
(x[t]^2 + y[t]^2)), Derivative[x][t] ==
px[t]/m, Derivative[y][t] == py[t]/m}

sol = NDSolve[
Join[deqn, {x == 10, y == 0.1, px == -0.5, py == 0}]
/. {g -> 1, K -> 1/2, m -> 1}, {x[t], y[t], px[t], py[t]}, {t, 0, 20}]

ParametricPlot[Evaluate[
{x[t], y[t]} /. sol], {t, 0, 20}]

gives a fine scattering.

Regards
Jens

"dumb_founded" <andreajagger_8 at hotmail.com> schrieb im Newsbeitrag
news:d03o8d\$8ab\$1 at smc.vnet.net...
>I was using Mathematica to solve simultaneously the x and y equations
> of motion for a particle subjected to a Yukawa potential.  NDSolve
> predictably gave an interpolating function.  However, when I tried to
> plot this function, I got the error message that it is not real valued
> at certain pairs of points.  What is going on?  Can I do anything to
> remedy the situation?
>
>
> Thanks.
>

```

• Prev by Date: Re: Re: Free variables in an expression
• Next by Date: Re: New in 5.1.1?
• Previous by thread: Re: Yukawa
• Next by thread: Re: Mathematical Experiments (how to construct more functions)