Quick check — Differential equation

Just want to quickly check that I have got this right: Am I right in thinking that the solution of $\dfrac{d^2y}{dx^2} = \sin(y)$ is $y(x) = 2 \arctan\left[\exp\left(\dfrac{x^2}{2}+ax+b\right)\right]$ where $a$, $b$ are constants of integration?

Thanks guys.

-
It may be hard (impossible, even) to solve a differential equation, but it's easy to check whether a given function is a solution: you just pop it into the equation, and you see whether it works. Did you do this? – Gerry Myerson Aug 14 '11 at 10:58
@Gerry: I tried differentiating the expression but I wasnt sure if it was just that I couldnt group the terms to give the correct form or if i was wrong... Now I see that it is the latter... – scoobs Aug 14 '11 at 13:16

Thanks, Hans. Where have I gone wrong? :( What I did was $csc(y) \frac{dy}{dx} = x+a$ then $log \left(tan\left(y/2 \right) \right) = (1/2) x^2 + ax + b$ ...? – scoobs Aug 14 '11 at 10:28
@scoobs: The first integration is wrong; $\csc(y(x)) \, y''(x)$ isn't the derivative of $\csc(y(x)) \, y'(x)$. – Hans Lundmark Aug 14 '11 at 10:52