How do I do a complete trigonometric expansion as shown in the graphic below in Mathcad 15 or 11?
See attached Mathcad 11 file.
Solved! Go to Solution.
Here's a MCD v11 file that works on the example you gave. I don't know how robust the symbolic processor on v15 is, or whether these keywords will work. The same expansions did not work in v14.
What is strange is that when I tried to add the same keywords from my example to your file (opened in v11), they didn't work, and the expression turned red. When I copied your expression into my old example file (attached, also in v11), then the expression expanded as you are looking for.
The problem is not a new one. You may be able to find a reference that has an algebraic solution for the spurious component at a freq n1*f1+/-n2*f2 as a fct of n1 and n2.
Lou
Hello Bill,
I'm not sure what you mean by that. Presuming you'd like to "simplify" the right hand side of the equation I suggest to take only this side and use the symbolic key word "expand" followed by the variable for which you want to solve.
Cheers
Raiko
Here's a MCD v11 file that works on the example you gave. I don't know how robust the symbolic processor on v15 is, or whether these keywords will work. The same expansions did not work in v14.
What is strange is that when I tried to add the same keywords from my example to your file (opened in v11), they didn't work, and the expression turned red. When I copied your expression into my old example file (attached, also in v11), then the expression expanded as you are looking for.
The problem is not a new one. You may be able to find a reference that has an algebraic solution for the spurious component at a freq n1*f1+/-n2*f2 as a fct of n1 and n2.
Lou
Lou,
Thank you very much! That works great!
I sure am glad I still have Mathcad 11.
Bill
Thank you, Alvaro.
It worked fine here after I opened it with Mathcad 15. That will be a big help for me, and others who have problems with trig expansions in Mathcad 15.
Bill
Thank you Alvaro for the workaround for MC15. I have no clue what the syntax means but I was able to get it to work!
Just a question for anyone: I performed the expansion on a third order expression with (cos(w1t) + cos(w2t)) but I noticed numerous imaginary terms in the symbolic results. Is this expected for a third order result? I had not seen nor heard of this for intermod products. Should these terms just be ignored? thanks.
If the symbolic result of expanding a known real function, such as the sum of cosines in your example, gives complex terms, then the net sum of the complex terms should be zero. With trig terms, the symbolic processor is likely using the complex exponential forms along the way, and is just not simplifying the result. One way to try to force this is to use the symbolic keyword COMPLEX, which forces a separation into real and imaginary parts. Try this alone or in combination with SIMPLIFY. Sometimes the order of the keywords matters.
I have always found that the symbolic processor needs a lot of hand holding to put things in a form that I like. Most of my experience is with the Maple version in mcd11 (which I still use frrequently), and only a little using the v14 symbolics. I hope the above notes help in your version.
Lou
They changed the "Complex" keyword to "Rectangular", and it's already included in Alvaro's worksheet. So there is something else going on.
Please post the worksheet
Thanks, here is the MC15 file showing the imaginary terms after trig expansion.
Bill
Dusted off my mcd14 and took a look. For some reason, the keywords in the phi function definiton don't seem to move along as expected when the function itself is invoked. The imaginary part is indeed zero, as it must be. You probably need to do some experimenting to see what (if anything) may work without continually adding keywords at each evaluation. My own sheets have many SIMPLIFY's liberally sprinkled in, often more than one per eval.
Lou
I don't know why it doesn't simplify the imaginary part to zero. Here's a variation that works for this case (but not for some of the others).
Thank you to Richard and Lou, you are obviously MC power users! I appreciate the time you took to help out a mc novice like me and reach a solution. The last time I used mc was maybe 4 yrs ago and even then it was only sporadic at best, not enough to achieve any real fluency in the language.
Cheers, Bill