I have to solve the nonlinear DE y'=x²-y² by using an infinite series expansion y= , but I've tried in vain. Maybe a change of variables would make it easier, but I don't know which one.

Thanks

Printable View

- Sep 5th 2009, 11:32 PMjavicgNonlinear ODE by an infinite series expansion
I have to solve the nonlinear DE y'=x²-y² by using an infinite series expansion y= , but I've tried in vain. Maybe a change of variables would make it easier, but I don't know which one.

Thanks - Sep 7th 2009, 10:54 AMCoomast
I suppose you are not really interested in this but if you want I can give you the analytical solution. I did not try answering your question so you can ignore the following if you want to. The solution involves the modified Bessel function of the first kind. It is not an easy equation but it is solvable. If you want just ask and I will post the solution.

coomast - Sep 7th 2009, 10:59 AMshawsend
Hi. I'm not sure about the applicability of power series to non-linear equations but I suspect if the equation is well-posed and the resulting expressions converge, then I would have hope the solution may be valid.

So what' wrong with considering:

and let:

Now inserting this power series into the DE I would get:

Adjusting the indexing so as to have the same powers on x:

which gives me a possible solution with:

I may need to study further the sum which represents the coefficients for the power series though, and I could get some indication of the validity of my proposed solution above by actually coding it in Mathematica, (say for 100 terms) and then comparing a plot of the solution with the actual solution which Mathematica can compute exactly. - Sep 7th 2009, 04:01 PMshawsend
I would think another approach is to convert it to a second order linear DE via a Riccati substitution . Doing that I get:

Now that one is more amendable to power series and since it's second order, likely will involve two power series. Then we can differentiate and make the substitution above to get it in terms of . - Sep 8th 2009, 01:59 PMshawsend
You guys don't mind if I work on this right? I still left him some work to do and sides, he's probably done with it anyway.

Starting with:

I do the Riccati substitution and obtain:

Letting

I get:

Now, after some work, I can express the solution in terms of two power series:

Not sure how that power series is related to the Bessel functions suggested by others and that reported by Mathematica however. Then:

At this point, I'm a little unclear about expressing the initial conditions in u from those in y. I assume all that's needed is the expression and we can use any initial conditions in u to make that ratio true. But I'm not sure about that. So here goes: I considered the IVP:

That means in term of u, I'd have . I'm a little unclear on that however. I next coded this in mathematica: I first solved numerically:

Then let in the series expression for u above. Plotted the first 25 terms and then superimposed the numerical results of u with the series results for u. The first plot shows excellent agreement. I next solved numerically:

Then made the substitution using the power series representation for u. I then superimposed the numerical plots of y with the power series plot of y. The second plot below again shows excellent agreement. This gives me some confidence that the power series is correct -you guys do realize all the secrets of the Universe can be found in non-linear equations right? :)

Here's the Mathematica code if anyone is interested:

Code:`(* solve equation numerically in u *)`

sol = NDSolve[{Derivative[2][ua][x] -

x^2*ua[x] == 0, ua[0] == 1,

Derivative[1][ua][0] == 2}, ua,

{x, 0, 5}]

p1 = Plot[ua[x] /. sol, {x, 0, 3},

PlotStyle -> Blue]

(* plot u as the power series *)

kmax = 25;

a0 = 1;

a1 = 2;

ub[x_] :=

a0*(1 + Sum[x^(4*k)/Product[

(3 + 4*j)*(4 + 4*j),

{j, 0, k - 1}], {k, 1, kmax}]) +

a1*(x + Sum[x^(4*k + 1)/Product[

(4 + 4*j)*(5 + 4*j),

{j, 0, k - 1}], {k, 1, kmax}]);

p2 = Plot[ub[x], {x, 0, 3},

PlotStyle -> Red]

netinu = Show[{p1, p2}]

(* solve equation in y numerically *)

sol2 = NDSolve[{Derivative[1][yb][x] +

yb[x]^2 - x^2 == 0, yb[0] == 2},

yb, {x, 0, 3}]

p3 = Plot[yb[x] /. sol2, {x, 0, 3},

PlotStyle -> Blue]

(* plot equation in y from power series in u *)

ya[x_] = D[ub[x], x]/ub[x];

p4 = Plot[ya[x], {x, 0, 3},

PlotStyle -> Red]

netiny = Show[{p4, p3}]