Skip to main content
1-Visitor
April 9, 2013
Solved

extracting coefficients of e^ix from polynomial

  • April 9, 2013
  • 13 replies
  • 4967 views

Hi everyone,

I am trying to extract the coefficients of e^ix from a polynomial. My attempts using the coeffs, e^ix command have been unsuccessfull and I am wondering if anyone has another solution.

So, i have a function like: y= (2+5k)e^ix + 7e^2ix + (2+9a)e^-ix

and want MathCAD to give me: coeffs(y) = ( 2+9a; 2+5k; 7).

Another example is in the attached file

Thanks for your replies!

Best answer by Werner_E

There is a problem with your sheet as the three Vector functions at the top won't consider their argument. If you look at the coefficients at the end you will notice there is no "b0" or "b1" showing up as it should. You have to follow the definition of those functions immedeatly by a symbolic evaluation to make it work. You may then omit that symbolic eval at the definition of Phi, as it would not be necessary there anymore.

13 replies

Werner_E
25-Diamond I
April 9, 2013

Haven't tried it, but couldn't you substitute e^i*theta for a variable X and search the coeefs of X? Even better replace the e^i*thata in BClefthand for X to do so.

I noticed that your functions a0vector() etc. are simply transposing its argument vector. Os ther a reason for doing it that elaborate way?

1-Visitor
April 9, 2013

Hi Werner,

I did try to substitute for a variable X and search coefficients but MathCAD doesn't replace it. So, I think it is unable to recognise e^i*theta as a function, no idea. (my knowledg about MathCAD is minimal).

About the a0vector, etc... what do you mean with transposing the argument vector? The purpose of a0vector, a1vectore, b0vector etc... is that these are unknown coefficients to be determined in a next step by solving the system against some other function. Don't exactly know what you mean with this.

19-Tanzanite
April 9, 2013

How about the attached?

Alan

23-Emerald I
April 9, 2013

Don't know if this helps or even if it's right.

Werner_E
25-Diamond I
April 9, 2013

As I found the easy way to avoid that Mathcad bug find attached a more streamlined way to deal with your symbolic vectors. Hope you find it useful.

extracting.png

Werner_E
25-Diamond I
April 9, 2013

OK, the last one. This shows how to get around the limitation of the last one of not being able to evaluate numerically.

19-Tanzanite
April 9, 2013

I've had a go at simplifying the worksheet also (I need to get a life!) - see attached.

Alan

Werner_E
25-Diamond I
April 9, 2013

Hmmm. looks like part of my worksheet from another thread

http://communities.ptc.com/message/201711#201711

Think you have attached the wrong sheet