I have been tasked with numerically solving the second order nonlinear differential equation for analysing column buckling: $\theta''+\mu.sin(\theta)=0$ with boundary conditions: $\theta(0)=0, \theta(1)=0$ where $\theta=\theta(s) $, for s on range [0, 1]. $s$ is the distance along the beam, and $\theta$ is the local angle of the beam with respect to the vertical.
I obtained a numerical approximation for the $\theta$ vector via Newtons method with $\mu=\pi^2$. The problem I have is plotting the deflected profile of the column under these conditions. I was also given that $\frac{dx}{ds}=sin(\theta)$ and $\frac{dy}{ds}=cos(\theta)$, where $x$ and $y$ are the horizontal and vertical directions respectively. From this I gathered that $x(s)=s.sin(\theta)$ and $y(s)=s.cos(\theta)$ given the asumption that at $s=0$, $x=0$ and $y=0$. When I plot $y$ against $x$, the column profile starts off vertical at $y(s=0)$ but is not vertical at the top, $y(s=1)$.
I'm confident the $\theta$ I obtained via Newtons method is correct so can only assume my method of converting to $x$ and $y$ coordinates is incorrect.
Any suggestions? Cheers.