# Question:how to make odetest give zero on its own solutions for this ode?

## Question:how to make odetest give zero on its own solutions for this ode?

This is an ode from text book.  The little tricky part on this is the right hand has abs on the dependent variable, otherwise it is trivial.

```restart;
ode:=diff(y(x),x) = abs(y(x))+1;
sol:=dsolve(ode,y(x))
```

Gives

I am not able to get odetest to give zero on either of the two solutions.

```odetest(sol[1],ode);
odetest(sol[2],ode);
```

None give zero. I tried assumptions on x>0, x<0 and tried simplify(...,symbolic), nothing gives zero.

Now the book gives the solutions without constant of integration, which is strange. This is what the book gives as solution

y(x) = exp(x)-1   x>=0
y(x) = 1-exp(-x) x<0

Which is the same as Maple's solution, but without the constant of integration! So when I removed _C1 from both solutions and added the assumptions on x, then I got zero

```odetest(subs(_C1=1,sol[1]),ode) assuming x<0;
0

odetest(subs(_C1=1,sol[2]),ode) assuming x>=0
0
```

I solved this by hand, and got same solution as Maple actually (may be I made the same mistake as Maple? :)

But the above shows these solution are not correct? I do not now know what happend to the constant of integration in the book solution since it only shows final solution. It looks like book just used C=1 for the constant of integration. But Maple also thinks the book solution is correct.

fyi, the implicit solution by Maple does verify with no problem:

```ode:=diff(y(x),x)=abs(y(x))+1;
sol:=dsolve(ode,y(x),'implicit');
odetest(sol,ode)

0
```

Any one can shed some light what is going on? Is Maple solution correct? If so, why it does not verify? Should Maple have given the book solution?

this is problem 9, page 15, "Elementary differential equations" by William F. Trench, 2001

Maple 2019.1

﻿