Here my code, to help for troubleshouting
Equation Psi
eq? =
(A*cos[?[t]]^2 - C*cos[?[t]]^2 + C)*[???][t] +
(-2*A*sin[?[t]]*cos[?[t]] + 2*C*sin[?[t]]*cos[?[t]])*
Derivative[1][?][t]* Derivative[1][?][t] +
C*cos[?[t]]*Derivative[1][?][t]*? ==
Subscript[m, 3]*g*L*sin[?[t]]*cos[?[t]]
Equation Theta
eq? =
A*(?^??)[t] +
cos[?[t]]*(A*sin[?[t]] - C*sin[?[t]])*(Derivative[1][?][t])^2 -
C*?*cos[?[t]]* Derivative[1][?][t] ==
Subscript[m, 3]*g*L*cos[?[t]]*sin[?[t]];
Equations at equilibrium point
eq?E = eq? /. {? -> (?e &), ? -> (?e &)};
eq?E = eq? /. {? -> (?e &), ? -> (?e &)};
Equations with small variations around the equilibrium
eq?Ae = eq? /. {? -> (?e + ??[#] &), ? -> (?e + ??[#] &)};
eq?Ae = eq? /. {? -> (?e + ??[#] &), ? -> (?e + ??[#] &)};
Change of variables
?eq? = Inner[Subtract, eq?Ae, eq?E, Equal];
?eq? = Inner[Subtract, eq?Ae, eq?E, Equal];
repl =
{??''[t] -> ??pp, ??'[t] -> ??p, ??[t] -> ??,
??''[t] -> ??pp, ??'[t] -> ??p, ??[t] -> ??};
eq?Li = (?eq?) /. repl
eq?Li = (?eq? ) /. repl
Linearization
eq?Li = Normal @
Series[eq?Li,
{??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}, {??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}];
eq?Li =
Normal @
Series[eq?Li,
{??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}, {??pp, 0, 1}, {??p, 0, 1}, {??, 0, 1}];
Change of variables
eq?Li = eq?Li /. Map[Reverse, repl]
--> result :
???(t)(??(t)???(t)(?2Asin(?e)cos?(?e)?2Acos(?e)sin?(?e)+2Csin(?e)cos?(?e)+2Ccos(?e)sin?(?e))+???(t)(2Csin(?e)cos(?e)?2Asin(?e)cos(?e)))+????(t)(??(t)(2Acos(?e)cos?(?e)?2Ccos(?e)cos?(?e))+Acos(?e)2?Ccos(?e)2+C)+C???(t)cos?(?e)???(t)+C?cos(?e)???(t)=??(t)(gLm3cos(?e)sin?(?e)+gLm3??(t)cos?(?e)sin?(?e))+gLm3??(t)sin(?e)cos?(?e)
eq?Li = eq?Li /. Map[Reverse, repl]
--> Result :
A????(t)+???(t)(?C?cos(?e)?C???(t)cos?(?e))=??(t)(gLm3sin(?e)cos?(?e)+gLm3??(t)sin?(?e)cos?(?e))+gLm3??(t)cos(?e)sin?(?e)