Integral of a surface bounded by 2 hyperbolas

3 views (last 30 days)
I am trying to find the surface area surounded by two hyperbola's:
a, C, c are constant.
y and z are variables giving the outlining of the surface area surounded by the hyperbola's
I want to do a double integral. first bounded to y as function of z.
Later bounded by the intersection point of the two functions.
My script crashes at the integration at step 1. It seems that Matlab cannot handle a variable function in its integral function.
Hopefully someone can help me
% Make symbolic variables for the funtions.
syms a b y c z C
%For a = b, a square star is obtainted
b = a;
% Boundary Hyperbolas
bh = (a^2 - y^2 + c*z^2) * (b^2 + c*y^2 - z^2) ;
phi = C * bh ;
%Boundaries
ymin = -(a^2+c*z^2);
ymax = (a^2+c*z^2);
zmin = -a*sqrt((c+1)/(1-c^2));
zmax = a*sqrt((c+1)/(1-c^2));
%Integration step 1
step1 = integrate(phi,y,ymin,ymax);
%Integration step 2
step2 = integrate(step1,z,zmin,zmax);

Accepted Answer

John D'Errico
John D'Errico on 24 Sep 2019
Edited: John D'Errico on 24 Sep 2019
This is not a problem that MATLAB cannot handle something. It is a problem of using the wrong tool.
Integrate is a curve fitting toolbox function.
It is not designed to solve symbolic problems. That is left to int, a function from the symbolic toolbox. Why not use the proper tool for the problem? It might even work then.
For example...
step1 = int(phi,y,ymin,ymax)
step1 =
2*C*(a^2 - z^2)*(a^2 + c*z^2)^2 - 2*((C*(a^2 - z^2))/3 - (C*c*(a^2 + c*z^2))/3)*(a^2 + c*z^2)^3 - (2*C*c*(a^2 + c*z^2)^5)/5
Would you use a hammer to drive in a screw? If you would, then stay clear of my workshop.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!