surface area of revolution

I'm trying to obtain a surface area of revolution (about y-axis) - and would like both a generated surface but also the numerical value.

The example I'm trying is y=x^(1/3) i.e. cube root of x; 1 < x <2

I'm using:
integral (2*pi*x* sqrt(1 + (dx/dy)^2 ) - but getting an answer that is not right... I get value of ~39; should be ~199.5

Any help on the maths and the implementation of this on IGOR would be helpful
Kind regards
Colin
This looks like a basic homework problem that is solved in many places online.

Your expression: (2*pi*x* sqrt(1 + (dx/dy)^2 )

can be written in terms of y as:

2*pi*(y^3)*sqrt(1+9*(y^4))

to integrate in IGOR use:
Function UserFunctionName(inX)
    Variable inX
   
    return 2*pi*inX^3*sqrt(1+9*inX^4)
End

and then execute
print Integrate1D(UserFunctionName, 1, 2,2)


I hope this helps,

A.G.
WaveMetrics, Inc.
Dear AG.,
Many thanks for that - and indeed gives the correct answer.

Now that a simple problem can be solved, I'm wanting to progress this to carry out the surface area of revolution on curves that are not normal functions...

Attached is an OCT image of a retina with a hole at the fovea - I've traced the surface of this and the attached ibw files are the x,y data and line x=0 will be a centre line and rotation about y-axis.

This is where I'm heading following the earlier and easier problem...

Any help to move away from algebraic to numerical curves would be most appreciated
Kind regards
Colin
retina 1.jpg (423.69 KB) wave4_x.ibw (656 bytes) wave5_y.ibw (656 bytes)
colingrant wrote:

Attached is an OCT image of a retina with a hole at the fovea - I've traced the surface of this and the attached ibw files are the x,y data and line x=0 will be a centre line and rotation about y-axis.
Colin


If your surface of revolution is described by the curve you see when you execute:
display wave5 vs wave4


I suggest fitting it to a simple polynomial and then computing the resulting surface as above. Start e.g.,
CurveFit/NTHR=0 poly 6,  wave5 /X=wave4 /D


Obviously you could work with the trace data directly but I suspect that your numerical derivatives are going to introduce sufficient inaccuracies that you are better off with the fitted polynomial approach.

A.G.
WaveMetrics, Inc.
Thanks for the help.
I'm wanting to ensure I get the right answer to a simple problem to get the expected result before using my retinal surfaces.

So, if I generate data for y=(x)^(1/3) and use a curve fitting method but not to utilise the algebraic solution you kindly provided earlier...(2*pi*inX^3*sqrt(1+9*inX^4))
I see what you did in turning y=x^(1/3); x=y^3; dx/dy = 3x^2; (dx/dy)^2 = 9x^4 etc... However, I'd like to be able to do this to any curve with any generic (x,y) data; purely using only generated curve fitted data and the differentiated data of that curve fitting....

Still get incorrect answer for surface area of revolution about y-axis - Any help in identifying how to get the correct answer to this, without using the "known" y(x)=x^(1/3) relationship would be appreciated.

Make/N=200/D dataX
SetScale/I x 1,2,"", dataX
dataX=x
Duplicate dataX, dataY

 
dataY=dataX^(1/3)
Display dataY vs dataX

CurveFit/M=2/W=0 poly_XOffset 6, dataY/X=dataX/D        // 6th order polynomial fit

ModifyGraph lstyle(fit_dataY)=11,lsize(fit_dataY)=2,rgb(fit_dataY)=(0,0,0)

Differentiate dataY/X=dataX/D=dataY_DIF;DelayUpdate
Edit dataY,dataX,dataY_DIF

dataY_DIF=1/dataY_DIF   // invert (dy/dx) to (dx/dy)

Duplicate dataY, data1

data1=2*pi*fit_dataY*sqrt(1+dataY_DIF^2)

Integrate data1/D=data1_INT;DelayUpdate
Edit data1,data1_INT


colingrant wrote:
I'd like to be able to do this to any curve with any generic (x,y) data; purely using only generated curve fitted data and the differentiated data of that curve fitting....


The curve fitting I suggested was appropriate for the retinal data that you sent. A 6 term polynomial is not appropriate for an arbitrary data set.

Returning to the initial problem, I suggest you consider the 2D integration as integral [0,2*pi] and integral [x1,x2]. The integrand itself is f(x)*sqrt[1+f'(x)^2]. Rotational symmetry gives you a factor of 2*pi for the first integral.

I suggested the polynomial fit so that you could avoid computing f'(x) numerically and squaring it. Your tracing data did not appear to represent a smooth curve which would affect the derivative and its square. Using the fit allows you to write down both f(x) and the derivative and then numerically evaluate the integral.

If you are not aiming at smooth data you can treat each line segment (x1,y1) to (x2,y2) as an independent segment revolving around the y-axis. For this line segment f(x)=a*x+b, f'(x)=a=(y2-y1)/(x2-x1). For example, suppose you have a simple line f(x)=x for x in [0,1]. This leads to a=1, b=0 and the integrand is x*sqrt(1+a^2) which gives you sqrt(2)/2. The surface area for this revolving line segment is 2*pi*sqrt(2)/2 or sqrt(2)*pi.

I hope this helps,

A.G.
WaveMetrics, Inc.