Question: why odetest(sol,ode) do not give zero, but odetest(sol,[ode,IC]) does?

How to explain this strange behavior?   odetest(sol,ode) does not give zero. But odetest(sol,[ode,IC]) gives [0,0]

Same solution and same ode. Why adding IC, now odetest says solution verifies the ode, but without adding IC, it does not give zero right away. I know I can simplify the result to zero. But the point is that it should have given zero right away, because that is what it did when adding IC.

Should it not have given zero in first case also?

Can't upload worksheet due to security. Here is code and screen shot

ode := diff(y(x),x) + cos(1/exp(2*x))*y(x) = sin(1/exp(x));
IC := a*D(y)(x0)+c*y(x0) = b*y0;
sol:=y(x) = ((-cos(exp(-2*x0))*a + c)*Int(sin(exp(-tau))*exp(-1/2*Ci(exp(-2*tau))), tau = 0 .. x0) + Int(sin(exp(-tau))*exp(-1/2*Ci(exp(-2*tau))), tau = 0 .. x)*(cos(exp(-2*x0))*a - c) + exp(-1/2*Ci(exp(-2*x0)))*(a*sin(exp(-x0)) - b*y0))*exp(1/2*Ci(exp(-2*x)))/(cos(exp(-2*x0))*a - c);

odetest(sol,ode);

#not zero

#now

odetest(sol,[ode,IC]);

#gives [0,0]

 

Please Wait...