We have given Nonlinear ODE as $y'=y+e^x-e^{-x}y^2$ and one of its solution is given by $y(x)=-e^x$.
Is it possible to find solution of IVP with $y(0)=6$?
If it is linear ODE then by equating constant we can get solution.
But how to solve problem if it is non linear ODE?
Any help will be greatly appreciated.
This is a Riccati equation. The second solution approach consists in setting $y=e^x\frac{u'}{u}$ so that \begin{align} y'&=e^x\frac{u'}{u}+e^x\frac{u''}{u}-e^x\frac{u'^2}{u^2}=y+e^x\frac{u''}{u}-e^{-x}y^2 \\ &=y+e^x-e^{-x}y^2 \\[1em] \implies u''=u\implies u&=Ae^x+Be^{-x},~~y=e^x\frac{Ae^x-Be^{-x}}{Ae^x+Be^{-x}} \end{align} where pairs $(A,B)$ with the same ratio give the same solution. Your given solution corresponds to $A=0$, $B=1$.
For the solution with $y(0)=6$ you want $u(0)=1$, $u'(0)=6$, thus $u(x)=\cosh(x)+6\sinh(x)$.