u(x) is the height of the interface at a radius x from the axis of rotation,
g is the acceleration due to gravity,
rho is the density of water at room temperature,
R is the radius of the cylinder,
h is the lowest part of the curve =u(0),
h0 is the height of the water when the rotational velocity is zero,
omega is the rotational velocity,
K is the rotational kinetic energy = I * omega^2/2,
U is the gravitational potential energy,
V is the volume of the water after equilibrium is reached,
lambda is the Lagrange multiplier,
and E is the energy function to minimize.
>
restart;
>
U:=int(pi*rho*g*(x*(u(x)^2-h)),x=0..R);
>
K:=-int(pi*omega^2*rho*x^3*(u(x)-h),x=0..R);
>
V:=int(2*pi*u(x)*x,x=0..R);
>
E:=K+U+lambda*V;
>
t1:=subs({u(x)=a1,diff(u(x),x)=a2},E);
>
t2:=subs(R=x,diff(t1,R));
>
t3:=subs({a1=u(x),a2=diff(u(x),x)},diff(t2,a1))-diff(subs({a1=u(x),a2=diff(u(x),x)},diff(t2,a2)),x);
>
u1:=solve(t3,u(x));
>
constraint:=h0*R^2*pi=V;
>
subs(u(x)=u1,constraint);
>
solve(%,lambda);
>
lambda1:=%;
>
u2:=subs(lambda=lambda1,u1);
>
simplify(%);
>
>