Solution (source code)

= Solution

In a steady state, $\nu u_s''=-G\sin(n\pi x)$. Since the second <derivative> of the <sine> is $-(n\pi)^2$ times itself,
$$
u_s(x)=\frac{G}{\nu n^2\pi^2}\sin(n\pi x)+Ax+B.
$$
The zero boundary values at $x=0,1$ force $A=B=0$. Therefore
$$
\boxed{u_s(x)=\frac{G}{\nu n^2\pi^2}\sin(n\pi x)}.
$$