The cross-section of a hall can be described by the following function:
where b is the half-span (12 m) and h is the height (10 m).
The length of the hall is l (20 m), the height of the false ceiling is m (7 m).
A possible solution: DOWNLOAD
Let's divide the curve of the function into smaller sections, replacing the curve with its chord at each of these sections, and use this approximation to draw and calculate its enclosed area and length.
Let's divide the span into 2n equal parts which ensures that for every n value there is a point that falls on the symmetry axis. When plotting the curve, we move in the x direction from –b to +b over the entire span, and at each i step we calculate the height as the yvalue of the function.
Connecting these points of the original curve with straight segments results in a polyline. At an arbitrary i step, the horizontal coordinates of the endpoints of the current segment are xi and xi+1 , while its height coordinates are yi and yi+1.
The accuracy of the representaiton of the curve is determined by the number of points in which the value of the function is calculated. Since in this case the function is symmetrical, it is worth dividing it into an even number of sections (2n). We can use a variable traditionally denoted by i for indicating the sequence number of each point from –n to +n (-10 ≤ i ≤ +10). The x coordinate of the point i is then obtained by the formula i/n*b.
When we substitute the curve with its string between two division points, the area ∆a below section i can be calculated as a trapezoid:
When we substitute the curve with its string between two division points, the length ∆l of section i can be obtained as the hypotenuse of a right-angled triangle and the lengths of its legs can be calculated as the difference between the two x and the two y coordinates:
By calculating these elementary arc lengths and areas for each section and summing them up, we obtain an approximation of the total arc length and area with satisfactory accuracy.
It is important to note that the number of sections is always one less than that of the division points, so there can always be one less elementary arc length and area than the number of coordinate values calculated. Since the section i requires division point i+1 also, in the case of i=n we can no longer calculate either the ∆l length or ∆a area.
A closer look at the diagram shows that some inaccuracies arise from the fact that the intersection of the two functions is not exactly in a division point. By increasing the n number of the division, this inaccuracy can of course be reduced (or, if you don't want to work with too many points, the intersection location can be refined with iteration)—you can find what x belongs to a point where the height difference between f and m is sufficiently close to zero.
If we increase the radius of the semicircle it obviously reaches the point of the function that is closest to its center point, the origin. The distance of this point of contact from the origin decides the radius of the semicircle. As a first approximation, we can look for the closest point that has been used in the representation of the function — later we will look for a more precise solution.
For the third-degree curve, the y values were calculated for each x value with an even increment of Δx. In the case of a semicircle, this solution would be somewhat cumbersome and imprecise, so both the x and the y coordinates are calculated as functions of ρ, the central angle of the points. To get an even increment of Δρ, we divide the range 2n times from 0 to π, and for each ρ value we calculate the x és y coordinates.
The parametric equations of a semicircle whose center is at the origin:
where
You can get a more accurate value by increasing n, by using Solver, or by using a Visual Basic module.
The distance from the origin can be determined quite simply for any point of the curve:
The distance can thus be written as a new function and the minimum value of this new function determines the radius of the tangent circle. In geometric terms, the extreme value of a function is where the slope of the function (the slope of its tangent drawn at that point) is zero and between the two points where the slope changes its sign.
Solver is a module in Excel that can use iteration to determine the extreme value. If it is already activated, you can access it from the Data menu. If it's not there, try to load it (see the Office Help)
If the search is successful, the Solver Results dialog box indicates that it has found a possible solution where all constraints and optimization condition has been met, and then we can choose to keep the Solver solution), or you can restore the original values).
In order to visually check the solution, it is worth showing the location of the tangent point e.g. by plotting the line connecting it with the origin.