Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem involving NDSolve

0 views
Skip to first unread message

Grandpa

unread,
Mar 22, 2008, 1:52:15 AM3/22/08
to
So here's my dilemma. I am trying to solve a differential equation with complex roots. Mathematica is taking the incorrect root at certain points when the function crosses over itself. I generated a set of all points at which this occurs. The set is

ProblemList={2.8, 5.599, 8.398}

I now want to use these points in a function. My function is

ComplexRoot[t_]:= If[Abs[t - ProblemList[[1]]] > .01 && Abs[t - ProblemList[[2]]] > .01 && Abs[t - ProblemList[[ 3]]] > .01, Evaluate[I*(2 + 1/2)(I*x[t])^(1 + 1/2)], Evaluate[p'[t - .01]]]

The goal here is to have Mathematica take the correct root for all t other than the problem t values, and at those t values simply continue in the direction it was heading previously. So I want to then plug into the differential equation

solution=NDSolve[{x'[t] == 2p[t], x[0] == 0, p'[t]==ComplexRoot[t], p[0] == 1},
{x, p}, {t,0,10}, WorkingPrecision -> 30, MaxSteps -> Infinity][[1]];

and not get an error. Right now it gives me an error saying that I haven't "literally matched the independent variables."

If it works, the following graph should have two loops and look like an infinity sign with one of the loops being smaller than the other.

ParametricPlot[{Re[p[t]] /. solution, Im[p[t]] /. solution}, Evaluate[{t,0,10}],PlotRange -> {{-2, 2}, {-2, 2}}]

What can I do to fix this issue? Any and all help is greatly appreciated.

Thanks,
Alex

David Park

unread,
Mar 23, 2008, 2:03:17 AM3/23/08
to
I posted a solution to this problem on 12 March 08.

--
David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/


"Grandpa" <aclon...@wustl.edu> wrote in message
news:fs26qf$9l$1...@smc.vnet.net...

0 new messages