Home » Blog » Find solutions of y′ -y = -y2(x2 + x + 1) for given initial values

Find solutions of y′ -y = -y2(x2 + x + 1) for given initial values

Find all solutions of the nonlinear differential equation

    \[ y' - y = -y^2 (x^2+x+1) \]

on the interval (-\infty, +\infty) satisfying the initial conditions

    \[ y = 1 \qquad \text{when} \qquad x = 0. \]


From a previous exercise (Section 8.5, Exercise #13) we know that a function y = f(x) which is never zero on an interval I is a solution of the initial value problem

    \[ y' + P(x) y = Q(x) y^n \qquad \text{on } I, \qquad \text{with } (f(a))^k = b \]

if and only if (f(x))^k = g(x) on I where g(x) = v is the unique solution of the initial-value problem

    \[ v' + kP(x) v = kQ(x) \qquad \text{on } I, \qquad \text{with } g(a) = b. \]

In the present problem we have the equation

    \[ y' - y = -y^2(x^2+x+1) \qquad \text{on } (-\infty, +\infty) \qquad \text{with } y = 1 \text{ when } x = 0. \]

Therefore, to apply the previous exercise we have

    \[ P(x) = -1, \quad Q(x) = -(x^2+x+1), n = 2,  k = 1 - n = -1. \]

Hence, f(x) is a solution to the given equation if and only if (f(x))^{-1} = g(x) where g(x) is the unique solution to

    \[ v' + v = x^2+x+1 \qquad \text{with } g(0) = 1. \]

We can solve this using Theorem 8.3 (page 310 of Apostol), first computing

    \[ A(x) = \int_0^x \,dt = x, \]

giving us

    \begin{align*}  g(x) &= e^{-x} + e^{-x} \int_0^x (t^2+t+1)e^t \, dt \\  &= e^{-x} + e^{-x} \left( e^t (t^2 - t + 2) \right) \Bigr \rvert_0^x \\  &= e^{-x} + e^{-x} ( x^2 e^x - xe^x + 2e^x - 2) \\  &= e^{-x} + x^2 - x + 2 - 2e^{-x} \\  &= x^2 - x + 2 - e^{-x}. \end{align*}

Therefore,

    \[ (f(x))^{-1} = g(x) \quad \implies \quad f(x) = \frac{1}{x^2-x+2-e^{-x}}. \]

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):