kill(all)$globalsolve:true$

depends(u,x,σ,x);

RR:diff(σ(x),x)=-ω**2*ρ*x;
Hook:σ_x/E+α*ΔT;
ε:diff(u(x),x);

σ_x:rhs(desolve(RR,σ(x)));

σ_x:subst(C_1,σ(0),σ_x);

u_x:rhs(desolve(ε=''Hook,u(x)));

u_x:subst(C_2,u(0),u_x);

OP:[
at(u_x,x=R)=0,
at(u_x,x=-R)=0
];

linsolve(OP,[C_1,C_2]);

''σ_x;

ev(Hook,eval,ratsimp);