I found a case where AsymptoticDSolveValue gives correct solution to a second order ode when the RHS is zero. i.e. complementary solution is correct.

As we all know, when adding a term on the RHS, the complementary solution will not change, but we will get a particular solution now added due to the term on the RHS. This is true in series solution as well in exact solution.

But in the following example, the complementary solution changes.

ClearAll[x, y];
ode = x^2*y''[x] + x*y'[x] + x*y[x] == 0;
AsymptoticDSolveValue[ode, y[x], {x, 0, 4}];
Cases[%, C[_]*___]

Mathematica graphics

Now see what happens when adding a term on the RHS

ode = x^2*y''[x] + x*y'[x] + x*y[x] == 1/x;
AsymptoticDSolveValue[ode, y[x], {x, 0, 4}];
Cases[%, C[_]*___];
Collect[%, Log[x]]

Mathematica graphics

Comparing these side by side:

enter image description here

I verified the first solution is correct (when RHS is zero).

My question is: How to explain this difference in the complementary solution when adding something to the RHS? What Am I overlooking here? Notice that it is not just a matter of absorbing the difference into the constant of integration. The second solution has an extra linear term also. It is not just that the coefficients of the series are different.

The change happens in the second basis solution above. The first basis solution does not change.

V 13.2 on windows 10



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy