How should one guess a solution for this ODE? Guess a particular solution of the differential equation
$$ x^{\prime} - (1-2 t) x + x^2 = 2 t $$
I am trying to "guess" a solution to this ODE, but how should I go about doing so because I am sure, since this ODE is "guessable", there should be some kind process that tells me what form the solution should take, right?
 A: $$x^{\prime}-(1-2 t) x+x^2=2 t$$
$$x^{\prime}+(x-1)+2t(x-1)+(x-1)^2=0$$
Note that $x=1$ is a solution...You can start from that to transform the Riccati's DE  into a Bernoulli's DE. Try to substitute:
$$x(t)=1+u(t)$$
A: This equation $$ x^{\prime} - (1-2 t) x + x^2 = 2 t $$ hides secrets. As given in another answer first let $x(t) = 1 + u(t)$ to obtain the equation $$ u^{'} + (1 + 2 t) \, u + u^2 = 0.$$ Now let $$ u(t) = \frac{e^{- (t^2 + t)}}{f(t)} $$ to obtain $$ u^{'} = - (1 + 2 t) \, u - \frac{f^{'}}{f} \, u $$ which gives
\begin{align}
u^{'} + (1 + 2 t) \, u &= - \frac{f^{'}}{f} \, u \\
- \frac{f^{'}}{f} \, u + u^2 &= 0 \\
\frac{f^{'}}{f} &= u = \frac{1}{f} \, e^{- (t^2 + t)} \\
f^{'} &= e^{- (t^2 + t)}.
\end{align}
This equation leads to $$ f(t) = \frac{1}{2} \, \left( c_{0} + (\pi^2 \, e)^{1/4} \, \text{erf}\left(t + \frac{1}{2}\right) \right). $$ Working backwards with the substitutions leads to $$ x(t) = 1 + \frac{2 \, e^{-(t^2 + t)}}{c_{0} + (\pi^2 \, e)^{1/4} \, \text{erf}\left(t + \frac{1}{2}\right)}. $$
A: $x^{\prime}+(x-1)+2t(x-1)+(x-1)^2=0$
This is a riccati differential equation and is clearly  $x=1$ its private solution
$x=1+\frac{1}{z}$
$x'=-\frac{z'}{z^{2}}$
$-\frac{z'}{z^{2}}+\frac{1}{z}+\frac{2t}{z}+\frac{1}{z^{2}}=0$
$z'+(-1-2t)z=1$ ,Linear first order differential equation
$z=e^{\int(1+2t)dt}({\int {e^{\int(-1-2t)dt}}dt+c})$
$z=e^{t+t^{2}}({\int {e^{-t-t^{2}}dt}+c})$
$z=e^{t+t^{2}}{\frac{1}{2}}((\pi^2 \, e)^{\frac{1}{4}}(\text{erf}\left(t + \frac{1}{2}\right))+c)$
$$x(t) = 1 + \frac{2 \, e^{-(t^2 + t)}}{c + (\pi^2 \, e)^{\frac{1}{4}} \, \text{erf}\left(t + \frac{1}{2}\right)}$$
