10209 - Is This Integration ?
Moderator: Board moderators
-
- Experienced poster
- Posts: 115
- Joined: Tue Apr 06, 2004 7:04 pm
- Location: Venezuela
Why the formula?
Could any good "soul" explain me how I can reache this formulas? I tried so much to include/exclude simple geometric shapes in order to get the answer but I couldn't!
Thanks in advance!


Thanks in advance!
"Don't let the day go by
Don't let it end
Don't let the day go by, in doubts
The anwser lis within"
Don't let it end
Don't let the day go by, in doubts
The anwser lis within"
-
- New poster
- Posts: 35
- Joined: Wed Apr 12, 2006 6:03 pm
- Location: jakarta, indonesia
- Contact:
I tried to get the equations above but I coudn't. I get 2 equations with 3 variables and I can't find the third one, to solve the system. So, I tried to integrate the equation sqrt(a^2 - x^2) + a, in the range (0, a/2), in order to get half of the square-lined area. After this integration, the formula that I get is: (a^2 * sqrt(3.0))/8.0 + (a^2 * asin(0.5) )/2.0 + (a^3)/8.0 . So I multiply this result by 2.0 and get the answer of the square-lined area. But this answer doens't work. Could anybody help me with this problem?
Thank you very much!
Thank you very much!
Regards,
[]'s
Andre
[]'s
Andre
Since there are codes for this problem on the board, I guess I'm not giving too much with this post, so these are the areas I used to find the formulas.
http://www.ee.furg.br/~thiago/10209.jpg
http://www.ee.furg.br/~thiago/10209.jpg
Thiago Sonego Goulart - UFMG/Brazil
Thank you tgoulart!
I got AC today! =D I was misusing the integral. I saw yor third figure and I figured out my error. With your third picture I got te third equation.
I'll explain how I solve this problem, since the equations given in previous codes in this forum are too hard to understand. Let's call x, y and z the pieces of the figure. So, we got the equations:
4x + y + 4z = a * a = square area
x + 2z = a*a - (PI * a * a)/4.0 = square area - 1/4 of the circle area
and the third one, the more complicated to get:
2x + 0.5y + 1.5z = integral( a^2 - sqrt(a^2 - x^2) ) in the range [0,a/2]
(try to visualize the equations above in the figure. The figures posted by tgoulart show them)
The integral is easy to find in some book and also in the internet. If someone get stuck in this part, post here and I explain how to solve the integral.
We now have 3 equations and 3 variables, so it is easy to solve using Cramer's Rule. After finding D, Dx, Dy, Dz, the answer to this problem is given by: (Dy/D, 4.0*(Dx/D), 4.0*(Dz/D)) respectively.
I got AC today! =D I was misusing the integral. I saw yor third figure and I figured out my error. With your third picture I got te third equation.
I'll explain how I solve this problem, since the equations given in previous codes in this forum are too hard to understand. Let's call x, y and z the pieces of the figure. So, we got the equations:
4x + y + 4z = a * a = square area
x + 2z = a*a - (PI * a * a)/4.0 = square area - 1/4 of the circle area
and the third one, the more complicated to get:
2x + 0.5y + 1.5z = integral( a^2 - sqrt(a^2 - x^2) ) in the range [0,a/2]
(try to visualize the equations above in the figure. The figures posted by tgoulart show them)
The integral is easy to find in some book and also in the internet. If someone get stuck in this part, post here and I explain how to solve the integral.
We now have 3 equations and 3 variables, so it is easy to solve using Cramer's Rule. After finding D, Dx, Dy, Dz, the answer to this problem is given by: (Dy/D, 4.0*(Dx/D), 4.0*(Dz/D)) respectively.
Regards,
[]'s
Andre
[]'s
Andre
10209 TLE!
Could you please tell me why this gives me TLE
Code: Select all
#include<stdio.h>
int main()
{
//snipped
while(scanf("%lf", &r))
{
//snipped
}
}
Last edited by himanshu on Fri Oct 19, 2007 12:58 pm, edited 1 time in total.
Thanks
It worked!
is this real?
bonny wrote:no need to integrate![]()
3rd eqn: 2x+y+z=(pi/3 - sqrt(3)/4)a^2
try calculating the intersecting parts of 2 circles.
i have tried all my geometrical knowledge to figure that out.....
but i can't.
bonny or anyone else.........pls explain this...........
thanks and keep posting..........
Code: Select all
keep dreaming...
y m i getting WA
here's my code
can sum1 help
can sum1 help
Code: Select all
Code Deleted after AC
Last edited by fR0D on Mon Feb 25, 2008 8:22 pm, edited 1 time in total.
Re: y m i getting WA
I don't know if your expressions are right, but you'd better use double instead of float for real type.fR0D wrote:here's my code
can sum1 helpCode: Select all
REMOVED
Last edited by tgoulart on Mon Feb 25, 2008 11:05 pm, edited 1 time in total.
Thiago Sonego Goulart - UFMG/Brazil