Find the solution of the differential equation
dydx=(y+1)2\displaystyle \frac{dy}{dx} = (y + 1)^2dxdy=(y+1)2
given that y=0y = 0y=0 when x=2x = 2x=2. Give your answer in the form y=f(x)y = f(x)y=f(x).
State the set of values of x x\,x for which your solution is valid.