There are cases when the main algorithm fail. For example, let the ode be \(y^{\prime }+y\cot \left ( x\right ) =\cos \left ( x\right ) \) with IC \(y\left ( 0\right ) =0\). The general solution is
If we follow the main algorithm and plug-in the general solution into the IC, we obtain
Even if we take the limit of \(\lim _{x\rightarrow 0}\left ( -\frac {1}{2}\cos x\cot x+\frac {c_{1}}{\sin x}\right ) \). This does not help. In this case, we start by solving for \(c_{1}\) from the general solution. This gives
And now take the bidirectional limit.
Also the order can make difference. If we do
Then it will not work. So we have to try both orders to see if it is possible to solve for \(c_{1}\).
This method also works if we have more than one IC (say for second order ode). Let the solution for second order be
And let the IC be
For the first IC, We start by generating one equation for each \(c_{i}\) by solving for these from general solution. This gives
Applying the limit
Now we apply the second IC. For this we have to first differentiate the solution which gives
Solving for the \(c_{i}\) again gives
And now we apply the second IC to (3,4) giving
So we end up with 4 equations (1A,2A,3A,4A) with 2 unknowns to solve for \(c_{1},c_{2}\). This is OK. If the system is valid, there will be a solution for \(c_{1},c_{2}\) found.
This secondary algorithm is only used if the main algorithm does not work. Here an example using the secondary algorithm for second order ode.