math problem

A place where you can chat about anything that isn't to do with games!
Post Reply
User avatar
ED-057
Posts: 1560
Joined: Fri Jan 28, 2005 7:21 am
Location: USH

math problem

Post by ED-057 »

Image
There is a hemisphere with known volume. It is sliced across dividing it into sections A and B. The volume of B is known, and the volume of A can then be obtained by subtracting B from the whole. The thicknesses of the sections X and Y add up to the radius of the sphere R. How do I calculate X or Y when given the volume and radius?

for the volume of A I came up with this:
Pi*R^2*Y-(Pi*Y^3)/3

But I don't recall if I ever learned to solve this type of equation.
User avatar
Magic Knight
Posts: 206
Joined: Thu Jul 14, 2005 10:00 am
Location: Japan

Re: math problem

Post by Magic Knight »

I think this is what you want, for a sphere:
http://mathworld.wolfram.com/SphericalSegment.html
User avatar
GaijinPunch
Posts: 15850
Joined: Mon Jan 31, 2005 11:22 pm
Location: San Fransicso

Re: math problem

Post by GaijinPunch »

ED-057 wrote: But I don't recall if I ever learned to solve this type of equation.
I know I sure as fuck didn't.
RegalSin wrote:New PowerPuff Girls. They all have evil pornstart eyelashes.
e_tank
Posts: 148
Joined: Wed Apr 23, 2008 5:04 am

Re: math problem

Post by e_tank »

the equation you have there for the volume of section a is correct. there are direct formulas for finding the roots of cubic equations like this but you're probably not expected to use them as they're complicated to derive, you definitely would have remembered learning about them. unless we're both missing something obvious my best guess would be that you're probably expected to solve the equation numerically using newton's method, which to understand requires that you're familiar with approximating functions with a linearization using the function's first derivative - does this sound familiar?

more information about where you got this question may be helpful in determining how you're expected to go about solving it. was this a question given to you in a math class you're taking? if so what particular subject and section/what kind of things are you studying at the moment?
User avatar
guigui
Posts: 2231
Joined: Mon May 26, 2008 1:02 pm
Location: France

Re: math problem

Post by guigui »

Ahem, my job is math teacher, I cant help but reply to this...
ED-057 wrote: for the volume of A I came up with this:
Pi*R^2*Y-(Pi*Y^3)/3

But I don't recall if I ever learned to solve this type of equation.


That is not an equation since it does not contain any = sign. I did not get what you want to do. Solve this equals something with Y unknown ?
Bravo jolie Ln, tu as trouvé : l'armée de l'air c'est là où on peut te tenir par la main.
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Re: math problem

Post by antron »

the function of a circle can be integrated over the ranges or x and y to find their relationship to A and B.
Last edited by antron on Wed Aug 04, 2010 11:32 am, edited 1 time in total.
User avatar
ED-057
Posts: 1560
Joined: Fri Jan 28, 2005 7:21 am
Location: USH

Re: math problem

Post by ED-057 »

I think this is what you want, for a sphere:
http://mathworld.wolfram.com/SphericalSegment.html
Yes, looking at their diagram... I would like to solve for h, but I didn`t see any solutions given for h. I looked also at the "spherical cap" page.
the equation you have there for the volume of section a is correct. there are direct formulas for finding the roots of cubic equations like this but you're probably not expected to use them as they're complicated to derive, you definitely would have remembered learning about them.
I just googled cubic equations and it appears that this may be above my pay grade, so to speak. It`s not a homework problem, just something I was trying to code as part of an experiment, purely for my own amusement. I may have to resort to an iterative routine that converges on a solution. Either that or dumb-down my model and assume a conical shape.
e_tank
Posts: 148
Joined: Wed Apr 23, 2008 5:04 am

Re: math problem

Post by e_tank »

@antron
that's what i did and i ended up with the same equation ED-057 posted for the volume of section a. the equation does provide a relationship between y and vol_a, but it's cubic in terms of y.

if i understand correctly solving for the roots of the equation posted:
0 = pi*(y*r^2 - (y^3)/3) - vol_a
should provide a correct answer.

the question is are we both doing something wrong? is there another (possibly simpler) way to go about solving this? and if the above is correct then how is he expected to solve for y? (my guess was he's supposed to use newton's method)

just to restate the problem, all that's given is the radius of the hemisphere and the volume of section b in the figure, with that info solve for y and x.

edit:
i typed the above up just as you posted back on this.. anyway you should be able to use newton's method with a guess based on the ratio between vol_a and the volume of the hemisphere as a starting point, i bet it will converge just fine. let me know if you need help on the details.
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Re: math problem

Post by antron »

^I see, he already did that and it got ugly.

how about this: http://www.mathopenref.com/segmentarea.html

and the arc angle in that link is equal to arccos(Y/R)*2

Image

so, area A = R^2*(arccos(Y/R)*2-sin(arccos(Y/R)*2))/2

using radians
e_tank
Posts: 148
Joined: Wed Apr 23, 2008 5:04 am

Re: math problem

Post by e_tank »

@antron
i dunno, that doesn't look any easier to solve in terms of y to me. at first glance i'm not sure how it could be turned into something more workable. if you want to give it a shot that's cool but at this point, seeing as it's something that's going to be solved in program code anyway i think newton's method is definitely the way to go (or the conical approximation), iterative methods are usually faster than direct methods anyway.

i would think that using an initial value based on the ratio of vol_a and the volume of the hemisphere (y_0 = r*vol_a/vol) will converge to the correct solution for pretty much any values associated with the problem. in the off chance it doesn't you can just use the original estimate as a fallback. the simplest approach is to just use a fixed number of iterations and then check if the solution is within bounds (0 <= y_n <= r). you can experiment with how many iterations you'll need but something like 3 will probably be good enough.
Post Reply