I am not a math major, so I thought to check with the experts here on this.
Given some ODE $y'(x)=f(y,x)$ solved by CAS system A which gives answer $y_1(x)$. Same ODE solved by CAS system B with answer $y_2(x)$.
Since the ODE does not involve initial conditions, Answers will contain constant(s) of integration. Lets say there is one constant of integration $C_0$ for now. (it was a first order ODE)
To verify that $y_1(x)$ is the same as $y_2(x)$, both solutions are plotted over some small range of $x$ around the origin to see if the solutions are the same.
Since there is a constant of integration, it is given some constant value, say the number $1$ in order just to be able to make a plot.
Is this a valid approach? Some of the answers are too complicated to visually verify the expressions are equivalent. But sometimes the solutions to the same ODE do not come up the same in the plot. There remains some difference. That is why I am asking here, if there is a better way to do this.
To make things more clear, an example below is given, with the solution from Maple and Mathematica. Both involve one constant of integration. Using $C_0=1$ the plots of the solutions are generated. Yet we see the plots of $y(x)$ are not exactly the same. There is still a shift involved. (The method has to be numerical, as it is simpler for quick verification).
the ODE is Kamke's #131 given by $\left( 1+2x\right) y^{\prime}\left( x\right) +2-4e^{-y\left( x\right) }=0$
The ODE is in Mathematica syntax:
Clear["Global`*"]; ode131 = (2*x + 1)*D[y[x], x] - 4*Exp[-y[x]] + 2 == 0 DSolve[%, y[x], x]
which gives
{{y[x] -> Log[2 - E^C[1]/(1 + 2*x)]}}
In Maple 16
restart; ode131:=(1+2*x)*diff(y(x),x)+2-4*exp(-y(x))=0: dsolve(%,y(x));
which gives
y(x) = -ln((1+2*x)/(-1+2*exp(2*_C1)+4*x*exp(2*_C1)))-2*_C1
Here is a plot of both solutions next to each others. We see the shift. Actually using different numerical value for the constant of integration, makes the solutions even more different looking. This is with $C_0=1$
(ps. Log
is natural log in Mathematica)
FYI, the equation from the book (it is written in German) and solution is
update
Using suggestion below by Mhenni Benghorbal, Maple says both solutions are the same:
ode := (2*x+1)*diff(y(x),x)-4*exp(-y(x))+2: mapleSol := dsolve( ode ): odetest( mapleSol, ode ); 0
and
mathematicaSol:=y(x)=ln(2 - (exp^_C1)/(1 + 2*x)): odetest( mathematicaSol, ode ); 0
So the answers the same. I'd still like to know if possible from Mathematics point of view why just plugging the same constant
in the solutions and plotting the resulting function do not show the same shapes.