Integration with Symbolic Variables
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a problem like that. How can i solve this?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1382899/image.png)
3 个评论
采纳的回答
VBBV
2023-5-12
syms theta r
a=10;
x=a*(1-cos(theta));
y=a*(1-sin(theta));
r=sqrt(x^2+y^2)
I = vpaintegral(r,0,2*pi)
更多回答(2 个)
Sulaymon Eshkabilov
2023-5-12
Use integral() - see DOC
E.g.:
% Step 1. Create a function handle:
F = @(theta, a)sqrt((a*(1-cos(theta))).^2+(a*(1-sin(theta))).^2);
% Step 2. Compute the integral:
INT_F = integral(@(theta)F(theta, 10), 0, 2*pi)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!