How to obtain the co-efficient of a trigonometric equations?
2 views (last 30 days)
Show older comments
I have a polynomial equation like consider f(x) = x^6+5x^4+x^2, and x is 2cos(A/2). After substituting in the equation, the equation is solved in terms of a0+a1*cos(A)+a2*cos(2A)+a2*cos(3A)..... I need the values for a0,a1,a2..... Do we have any instruction to obtain co-efficient in this case? Please let me know
Thank you
0 Comments
Answers (2)
Walter Roberson
on 4 Oct 2011
This can be done using indets() and some complicated type expressions. (Maple does a better job with type expressions, in my opinion.)
Easier is probably
newf = subs(f, {cos(A),cos(2*A),cos(3*A)}, {cosA, cos2A, cos3A});
Then you can use
coeff(newf, cos3A)
to find the coefficient corresponding to cos(3*A) (for example.) Just a simple change of variables.
0 Comments
Venkata
on 4 Oct 2011
5 Comments
Walter Roberson
on 5 Oct 2011
Well, as I indicated above:
Note: simplify() might not be enough to force the trig substitution in MuPad. In Maple, one would use combine(EXPRESSION,'trig') to do that substitution, but I have not yet found the MuPad equivalent of `combine/trig`
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!