Mathematica Asked by PureLine on September 2, 2020
I have a long equation, namely,
equ = 4576.66 a[1] Cos[t] + 3.3877 a[1]^3 Cos[t]^3 + 4576.65 a[2] Cos[2 t] + 10.1631 a[1]^2 a[2] Cos[t]^2 Cos[2 t] + 10.1631 a[1] a[2]^2 Cos[t] Cos[2 t]^2 + 3.3877 a[2]^3 Cos[2 t]^3 + 4576.63 a[3] Cos[3 t] + 10.1631 a[1]^2 a[3] Cos[t]^2 Cos[3 t] + 20.3262 a[1] a[2] a[3] Cos[t] Cos[2 t] Cos[3 t] + 10.1631 a[2]^2 a[3] Cos[2 t]^2 Cos[3 t] + 10.1631 a[1] a[3]^2 Cos[t] Cos[3 t]^2 + 10.1631 a[2] a[3]^2 Cos[2 t] Cos[3 t]^2 + 3.3877 a[3]^3 Cos[3 t]^3 - 0.415 a[1] Sin[t] - 0.83 a[2] Sin[2 t] - 1.245 a[3] Sin[3 t] == 2/625 Cos[theta] Cos[t w] - 2/625 Sin[theta] Sin[t w]
Since Sin[t]*Cos[t]^3
and so on is a small term, we can take it as 0. Consequently, we would like to eliminate sin[t] and cos[t] to the power of n. My instinct is to use Cases
to achieve it, but I don’t how to make it.
For example, I want keep 4576.66 a[1] Cos[t]
and 4576.65 a[2] Cos[2 t]
, but set 4576.65 a[2] Cos[2 t]
and 10.1631 a[1]^2 a[2] Cos[t]^2 Cos[2 t]
to 0
.
Aside from Cos[t]^2
and Cos[2t]^3
, Sin[t]*Cos[t]
and Sin[t]^2*Sin[2t]
and so on should be eliminate. In other words, only Sin[t]
Sin[2t]
Sin[3t]
… Sin[n*t]
and Cos[t]
Cos[2t]
Cos[3t]
… Cos[n*t]
should be left.
Terms like Sin[theta] Sin[t w]
should survive, because Sin[theta]
is a constant.
Use the following wolfram language grammar to extract the expected term: _ h any expression with head h
. Please refer to Patterns and Transformation Rules
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP