Hello everyone, I have been struggling for so much time...I have been doing a complex equation (I am actually able to solve it manually but I just want to ger more familiar with Matlab). There are 3 complex solutons, however, matlab only gives me one of them. What can I do so that it gives me all 3 solutions?

 채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 30일

0 개 추천

Square both sides of the equation. MATLAB will provide 3 solutions.
It is advisable to cross check the solutions, as squaring both sides can introduce false roots.

댓글 수: 2

>> syms z
>> solve((z^(-3/2))^2 == (3-3*i)^2)
ans =
(1i/18)^(1/3)
(1i/18)^(1/3)*((3^(1/2)*1i)/2 - 1/2)
-(1i/18)^(1/3)*((3^(1/2)*1i)/2 + 1/2)
>> simplify(solve((z^(-3/2))^2 == (3-3*i)^2))
ans =
((-1)^(1/6)*18^(2/3))/18
((-1)^(1/6)*2^(2/3)*3^(1/3)*(- 1 + 3^(1/2)*1i))/12
-((-1)^(1/6)*2^(2/3)*3^(1/3)*(1 + 3^(1/2)*1i))/12
>> double(ans)
ans =
0.330450538041682 + 0.190785707092222i
-0.330450538041682 + 0.190785707092222i
0 - 0.381571414184444i
>> ans.^(-3/2)
ans =
3 - 3i
-3 + 3i
-3 + 3i
Cross-check shows there is only one solution. The claim that there are 3 solutions is incorrect.
Graciano Ding
Graciano Ding 2019년 10월 30일
Just one question...how can (0-0.381571414184444i)^(-3/2) be -3+3*i? I calculated it manually and it should be one of the answers...what mistake did I make?complexo power.jpg

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sai Bhargav Avula
Sai Bhargav Avula 2019년 10월 30일
편집: Sai Bhargav Avula 2019년 10월 30일

0 개 추천

Hi,
MATLAB cannot generate all the Solutions, which might require a global solver.
However, if you have the Extended Symbolic Math Toolbox (access to Maple), then you can do this in Maple.
maple('_EnvAllSolutions:= true;')
This can give a generic result for the equation provided

댓글 수: 2

Walter Roberson
Walter Roberson 2019년 10월 30일
This is misleading. Producing all of the solutions does not require a global solver.
Sai Bhargav Avula
Sai Bhargav Avula 2019년 10월 30일
It might require different intilizations to get all the solutions. So I suggested this.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2019년 10월 30일

댓글:

2019년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by