We have,
y = ex + e2x .....(1)
Differentiating both sides of (1) with respect to x, we get
.....(2)
Differentiating both sides of (2) with respect to x, we get
It is the given differential equation.
Therefore, y = ex + e2x satisfies the given differential equation.
Also, when
And, when
Hence, y = ex + e2x is the solution to the given initial value problem.
Disclaimer: In the question instead of y(0) = 1, it should have been y(0) = 2.