Solve double integral using 'integral2'
Afficher commentaires plus anciens
Suppose I have this surface integral:

I use integral2 to solve the double integral but the result has complex number in it
My codes are:
syms x y z
format rat
x=sqrt(1-y.^2-z.^2)
xy=diff(x,y)
xz=diff(x,z)
dS = sqrt(100 + xy.^2 + xz.^2)
fun1 = subs((x+y+z).*dS)
f = matlabFunction(fun1)
Myz = integral2(f,0,10,0,@(y)sqrt(100-y.^2))
And the answer
f =
@(y,z)(y+z+sqrt(-y.^2-z.^2+1.0)).*sqrt(-y.^2./(y.^2+z.^2-1.0)-z.^2./(y.^2+z.^2-1.0)+1.0e2)
Warning: Reached the maximum number of function evaluations (10000). The result fails the global error test.
> In integral2Calc>integral2t (line 129)
In integral2Calc (line 9)
In integral2 (line 106)
In Untitled3 (line 18)
Myz =
139388/21 +97492/19i
What's the problem guys ? Thank you
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!