Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: How to obtain the co-efficient of a trigonometric equations? Date: Fri, 18 Nov 2011 19:55:30 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 13 Message-ID: <ja6d7i$o0o$1@newscl01ah.mathworks.com> References: <ja67kr$3op$1@newscl01ah.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: www-06-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1321646130 24600 172.30.248.38 (18 Nov 2011 19:55:30 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Fri, 18 Nov 2011 19:55:30 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:749802 "Venkata " <goutam_nalamati@yahoo.com> wrote in message <ja67kr$3op$1@newscl01ah.mathworks.com>... > I have a polynomial equation like consider f(x) = x^6+5x^4+x^2, and x is 2cos(A/2). After substituting x in the equation, the equation can be solved theoritically in terms of a0+a1*cos(A)+a2*cos(2A)+a2*cos(3A)..... I need the values for a0,a1,a2 using the matlab..... Do we have any instruction to obtain co-efficient in this case? Please let me know > Thank you - - - - - - - - - - If I understand your request correctly, you need to use the Symbolic Toolbox to make appropriate substitutions. To start with you have the following trigonometric identities: cos(A) = cos(2*A/2) = 2*cos(A/2)^2 - 1 cos(2*A) = cos(4*A/2) = 8*cos(A/2)^4 - 8*cos(A/2)^2 + 1 cos(3*A) = cos(6*A/2) = 32*cos(A/2)^6 - 48*cos(A/2)^4 + 18*cos(/2)^2 - 1 In the expression 'a0+a1*cos(A)+a2*cos(2*A)+a3*cos(3*A)' you should make the above substitutions of the right hand sides for the left hand sides. Then wherever cos(A/2) is, substitute 'x/2' and then 'collect' all the like powers of x. Each of the coefficients of x in the result should be the same as those in x^6+5x^4+x^2, which gives you four equations in four unknowns and can be easily solved using the 'solve' function. The result will be an exact set of values for a0, a1, a2, and a3. Roger Stafford