0

I have the following expression $$L=\frac{m}{2}\left(\dot{q}^{2} \sin ^{2} A t+\dot{q} q A \sin (2A t)+q^{2} A^{2}\right)$$ with $q=q(t)$

I want to make a change of variabl $$Q=q\sin(At)$$

By hand I find
$$L=\frac{m}{2}\left(\dot{Q}^2+A^2Q^2\right)$$

L = m/2 (q'[t]^2 Sin[A t]^2 + q'[t] q[t] A  Sin[2 A t] + A^2 q[t]^2)

I don't know how to can I find this new $L$ with the this transformation?

HB khaled
  • 103
  • 1

1 Answers1

4

You can simply replace the function q using ReplaceAll (/.), e.g.

Simplify[L /. q -> Function[{t}, Q[t]/Sin[A t]]]
(* 1/2 m (A^2 Q[t]^2 + Q'[t]^2) *)
Natas
  • 2,310
  • 4
  • 14