Triple integral of symbolic function

11 vues (au cours des 30 derniers jours)
Jiwon Park
Jiwon Park le 29 Avr 2022
I am trying to evaluate triple integral of a symbolic function.
Where the symbolic function is given as below:
func=r.^2.*sin(phi).*(r.^2.*cos(phi).^2 + r.*cos(theta).*sin(phi) + r.*sin(phi).*sin(theta))
The triple integral equation is given as below:
Since this is symbolic function integral, it should not be calculating the integral, instead return the value of the integral.
Which function within matlab should I be using?
and how to use that function?

Réponses (1)

Star Strider
Star Strider le 29 Avr 2022
Try this —
syms phi r theta r0 r1 phi0 phi1 theta0 theta1
sympref('AbbreviateOutput',false);
func(r,phi,theta) = r.^2.*sin(phi).*(r.^2.*cos(phi).^2 + r.*cos(theta).*sin(phi) + r.*sin(phi).*sin(theta))
func(r, phi, theta) = 
intr = int(func, r, r0, r1)
intr(phi, theta) = 
intphi = int(intr, phi, phi0, phi1)
intphi(theta) = 
inttheta = int(intphi, theta, theta0, theta1)
inttheta = 
int3 = simplify(inttheta, 500)
int3 = 
Make appropriate changes to get the desired result.
.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by