Simple differential equations problems I have an ODE.
$$
yy^{\prime\prime}-2(y^{\prime})^2+2y^{\prime}=0.
$$
My lecturer got the answer
$$
y=C,
$$
where $C$ is an arbitrary constant, or
$$
y=\frac{1}{\sqrt{C_1}}\tan(\sqrt{C_1}x+C_2),
$$
where $C_1,C_2$ are arbitrary constants, $C_1>0$. 
But I think the solution may differ due to the sign of $C_1$. Let $y^{\prime}=v$, then
$$
y^{\prime\prime}=\frac{dv}{dx}=\frac{dv}{dy}\frac{dy}{dx}=v\frac{dv}{dy}. 
$$
So this ODE becomes 
$$
vy\frac{dv}{dy}-2v^2+2v=0.
$$
Case 1: $v=0$, then $y=C$, $C$ is an arbitrary constant;
Case 2: if $v\ne0$, then separate variables, giving
$$
\frac{1}{v-1}dv=\frac{2}{y}dy. 
$$
Integrate both sides, we have 
$$
\int\frac{1}{v-1}\mathrm{d}v=\int\frac{2}{y}\mathrm{d}y, 
$$
i.e.,
$$
\ln|v-1|=\ln y^2+\ln|K|,
$$
where $K$ is a non-zero constant. So we have
$$
e^{\ln|v-1|}=e^{\ln|K|}e^{\ln{y^2}}, 
$$
and finally 
$$
|v-1|=|K|y^2.
$$
Therefore,
$$
v-1=\pm|K|y^2.
$$
Let $C_1=\pm|K|$, then 
$$
v=C_1y^2+1,
$$
where $C_1$ is a non-zero constant. Separate variables again, we get
$$
\int\frac{1}{C_1y^2+1}\mathrm{d}y=\int \mathrm{d}x. 
$$ 
Here is the problem: if $C_1<0$, we cannot use the integral
$$
\int\frac{1}{x^2+a^2}\mathrm{d}x=\frac{1}{a}\arctan\frac{x}{a}+C, 
$$
where $C$ is an arbitrary constant, instead, we need to use 
$$
\int\frac{1}{ax^2+b}\mathrm{d}x=\frac{1}{2\sqrt{-ab}}\ln\left|\frac{\sqrt{a}x-\sqrt{-b}}{\sqrt{a}x+\sqrt{-b}}\right|+C,\ a>0\ \text{and}\ b<0
$$
to solve the ODE. Am I wrong or was my lecturer wrong? I always got confused with these constants in first order ODE's. Thank you. 

You are right, and perhaps your lecturer too if he allows for complex arguments in the tangens and arc tangens functions. Then one can use 
$$
\tanh(ix)=i\tan(x)=y,
$$
and thus 
$$
\arctan(iy)=-\arctan(\tan(x))=-x=i\operatorname{Artanh}(y)
$$
The logarithm in your formula is just a different expession for $\operatorname{Artanh}$, since
$$
y=\tanh(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}}=\frac{e^{2x}-1}{e^{2x}+1}
$$
is equivalent to
$$
e^{2x}=\frac{1+y}{1-y}\iff x=\frac12\ln\left(\frac{1+y}{1-y}\right).
$$
