# an odd question about solving ODE by MATLAB

Why MATLAB sometimes cannot solve the relatively particular case but can solve the relatively general case?

For example:

I tried to input (x^2-1)*D2y + 0*x*Dy + 1*x*y = 0 in MATLAB and MATLAB still can't solve.

So I tried the cases of different integer values of a in MATLAB and the results are surprising:

It seems that MATLAB can solve the cases of odd integers $a$ but can't solve the cases of even integers $a$, except for $a=2$, which is accidentally solved by reduction of order.

Why MATLAB can solve the case of $a=2$ by reduction of order but not the cases of other even integers $a$? Can reduction of order in fact applicable for the cases of other even integers $a$? The usage of reduction of order has some limitations?

-

Because in some older version of MATLAB, the symbolic toolbox uses Maple kernel to perform the symbolic integration/differention, or directly returns some built-in solution included in Maple. In your case, please refer to: HeunC - The Heun Confluent function in Maple. Keep in mind that the semantics of your first command is somewhat ambiguous when passing to Maple due to lack of varargin-type input in this Maple function, in other words, you have to specify all the input to get a solution. In MATLAB, often something like dsolve calls other functions and uses varargin to pass unspecified number of parameters and inputs.

A little rant: However, too bad MATLAB dropped Maple support around 2008 or 2009, and has been using something else ever since, here I couldn't test it on my laptop right now. This is what I got:

Anyway I suggest you try:

s = dsolve('(x^2-1)*D2y + 0*x*Dy + 1*x*y = 0','x')

please keep me updated with what you got there.

-
Sorry about that the version of your MATLAB is too old. –  doraemonpaul May 16 '12 at 14:08