Getting complex value for real integration
이전 댓글 표시
I'm getting complex value in real integration while trying to find area under ellipse as shown in below figure. Please advise

댓글 수: 9
Mithun Kumar Munaganuri
2022년 3월 31일
Did you specify somewhere that
4*a^2 >= w^2
?
No, you didn't. That's why your "sqrt" can become complex-valued.
Maybe an "assume" will work.
Mithun Kumar Munaganuri
2022년 3월 31일
Torsten
2022년 3월 31일
Your assumption w <= 2a is not sufficient.
It is not equivalent to the assumption w^2 <= 4*a^2.
Mithun Kumar Munaganuri
2022년 3월 31일
Steven Lord
2022년 4월 4일
Please state with words and equations (not code) the specific problem you're trying to solve, so we can check that the code you've written is the correct code to solve that problem.
You're trying to compute the area bounded by a portion of an ellipse, the x axis, and potentially part of the y axis (from the way your picture is drawn.) Where are the foci of the ellipse, what are its major and minor axes lengths, or what is the equation that generates this ellipse?
If you hope to find the area (or half the area) of the ellipse, you are mistaken.
This would only work if the y-coordinate for the center of the ellipse lies on the x-axis.
Mithun Kumar Munaganuri
2022년 4월 4일
Mithun Kumar Munaganuri
2022년 4월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


