To determine whether the given function is a solution of the given differential equation, we first need to find the derivative of the function.

`y'=2x(2+e^x)+x^2e^x`

Now we plug that into the equation.

`x[2x(2+e^x)+x^2e^x]-2x^2(2+e^x)=`

`2x^2(2+e^x)+x^3e^x-2x^2(2+e^x)=`

`x^3e^x`

As we can see, after simplifying the left hand side we get the right hand side of the equation. This means that the given function **is a solution** of the given differential equation.

Of course, this is only one of the solutions. The general solution of this equation is `y=x^2(c+e^x).`

The image below shows graphs of several such functions for different values of `c.` The graph of the function from the beginning is the green one.

**Further Reading**