How to expand exponential of symbolic expression

조회 수: 14 (최근 30일)
Saurabh Bhapkar
Saurabh Bhapkar 2013년 11월 4일
답변: Sanil Mhatre 2016년 12월 8일
Basically i have a huge expression that has a lot of exp((a+bi)*t) terms.
Where a and b are numeric.
What i want is to separate out exp(bi*t) so that i can expand it to cos(bt)+isin(bt). How do i do this?

답변 (3개)

Sanil Mhatre
Sanil Mhatre 2016년 12월 8일
Input
syms b t
rewrite(exp(bi*t),'sincos')
Output
cos(b*t) + sin(b*t)*1i end

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 4일
Why are you expecting exp(2*t)*exp(3i*t) ?
2*t and 3*i*t are the same degree
Try this
syms t
q=exp((*t+3i*t^2)
expand(q)
% Result
exp(2*t)*exp(t^2*3*i)

Walter Roberson
Walter Roberson 2013년 11월 4일
exp(2*t)*exp(3i*t) expanded is exp(t)*exp(t)*exp(i*t)*exp(i*t)*exp(i*t) . Then automatically gather the identical terms to get exp(t)^2 * exp(i*t)^3 . There is no reason to expect that exp(2*t) * exp(3*i*t) would be given instead when you use expand()

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by