The Wayback Machine - https://web.archive.org/web/20240810200140/https://www.geeksforgeeks.org/area-of-circle-inscribed-in-a-isosceles-trapezoid/
Open In App

Area of circle inscribed in a Isosceles Trapezoid

Last Updated : 07 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Given two bases of the isosceles trapezoid ABCD as a and b, the task is to find the area of circle inscribed in this trapezoid
 


Examples: 
 

Input: a = 10, b = 30 
Output: Area = 235.57

Input: a = 20, b = 36
Output: Area = 565.38

Derivation: Given a circle inscribed in trapezium ABCD (sides AB = n and CD = m), we need to find out the height of the trapezium i.e., (AL), which is half of the radius of the circle to find the area of the circle.


For finding the height of circle we do following operation. 

  1. The circle will always touch the sides of trapezium at their midpoints, Say the midpoints of AB, BD, CD, AC are G, F, H, E, and join them with the center of the circle.
  2. Now from Symmetry, we can see that 
     
AG = AE = n/2, 
EC = CG = m/2,
HD = DF = n/2,
GB = FB = m/2
  1. Now in Triangle ACL apply the Pythagoras theorem. 
     
Hypotenuse AC = m/2 + n/2
Base CL = CH - AG = m/2 - n/2

we get
Perpendicular AL = Square_root(m * n)
  1. Therefore the height of the Trapezium = AL = Square_Root(Product of given sides)
  2. Now the radius of the circle is simple half of the height and hence the area can be calculated easily.

Approach:  

  1. Find the height of the trapezoid as (square_root( m * n )).
  2. Find the radius of the incircle 
     
R = height / 2 
= square_root(m * n) / 2
  1. Now find the area of the circle
     
= Pi * R2 
= ( 3.141 * m * n ) / 4


Below is the implementation of the above approach: 

Java
// Java Program to find 
// the area of the circle 
// inscribed in a trapezoid 
// having non- parallel sides m, n 
class GFG 
{ 
    
    // Function to find area of circle 
    // inscribed in a trapezoid 
    // having non- parallel sides m, n 
    static double area_of_circle(int m, int n) 
    { 
        // radius of circle by the 
        // formula i.e. root( m * n) / 2 
        // area of circle = (3.141 ) * ( R ** 2 ) 
    
        int square_of_radius = ( m * n ) / 4; 
        double area = ( 3.141 * square_of_radius ); 
        return area; 
    } 
    
    // Driver code 
    public static void main (String[] args) 
    { 
        int n = 10; 
        int m = 30; 
        System.out.println(area_of_circle(m, n)); 
    } 
} 

// This code is contributed by Yash_R
Python3
# Python 3 implementation to find 
# the area of the circle 
# inscribed in a trapezoid
# having non- parallel sides  m, n


# Function to find area of circle 
# inscribed in a trapezoid
# having non- parallel sides  m, n
def area_of_circle(m, n):
    # radius of circle by the
    # formula i.e. root( m * n) / 2
    # area of circle = (3.141 ) * ( R ** 2 )
    
    square_of_radius = ( m * n ) / 4
    area = ( 3.141 * square_of_radius )
    return area

# Driver Code 
if __name__=='__main__': 
    n = 10
    m = 30
    print(area_of_circle(m, n))
C#
// C# Program to find 
// the area of the circle 
// inscribed in a trapezoid 
// having non- parallel sides m, n 
using System; 

class GFG 
{ 
    
// Function to find area of circle 
// inscribed in a trapezoid 
// having non- parallel sides m, n 
static double area_of_circle(int m, int n) 
{ 
    // radius of circle by the 
    // formula i.e. root( m * n) / 2 
    // area of circle = (3.141 ) * ( R ** 2 ) 

    int square_of_radius = ( m * n ) / 4; 
    double area = ( 3.141 * square_of_radius ); 
    return area; 
} 

// Driver code 
public static void Main () 
{ 
    int n = 10; 
    int m = 30;
    Console.WriteLine(area_of_circle(m, n)); 
} 
} 

// This code is contributed by Sanjit_Prasad
JavaScript
<script>

// Javascript Program to find 
// the area of the circle 
// inscribed in a trapezoid 
// having non- parallel sides m, n 

// Function to find area of circle 
// inscribed in a trapezoid 
// having non- parallel sides m, n 
function area_of_circle(m, n) 
{ 
    
    // Radius of circle by the 
    // formula i.e. root( m * n) / 2 
    // area of circle = (3.141 ) * ( R ** 2 ) 

    var square_of_radius = ( m * n ) / 4; 
    var area = ( 3.141 * square_of_radius ); 
    return area; 
} 

// Driver Code 
var n = 10; 
var m = 30; 

document.write(area_of_circle(m, n)); 

// This code is contributed by Khushboogoyal499
    
</script>                    
C++
// CPP implementation to find
// the area of the circle
// inscribed in a trapezoid
// having non- parallel sides m, n
#include<bits/stdc++.h>
using namespace std;

// Function to find area of circle
// inscribed in a trapezoid
// having non- parallel sides m, n
double area_of_circle(int m, int n)
{
    // radius of circle by the
    // formula i.e. root( m * n) / 2
    // area of circle = (3.141 ) * ( R ** 2 )

    int square_of_radius = ( m * n ) / 4;
    double area = ( 3.141 * square_of_radius );
    return area;
}

// Driver Code
int main(){
    int n = 10;
    int m = 30;
    cout << (area_of_circle(m, n));
}

// This code is contributed by mohit kumar 29

Output
235.575

Time complexity: O(1)

space complexity: O(1)



Similar Reads

Area of a square inscribed in a circle which is inscribed in an equilateral triangle
Given here is an equilateral triangle with side length a, which inscribes a circle, which in turn inscribes a square. The task is to find the area of this square.Examples: Input: a = 6 Output: 1 Input: a = 10 Output: 0.527046 Approach: let r be the radius of circle, hence it is the inradius of equilateral triangle, so r = a /(2 * ?3) diagonal of sq
4 min read
Area of largest isosceles triangle that can be inscribed in an Ellipse whose vertex coincides with one extremity of the major axis
Given an ellipse with half the major and minor axes length A &amp; B, the task is to find the area of the largest isosceles triangle that can be inscribed in the ellipse whose vertex coincides with one extremity of the major axis. Examples: Input: A = 1, B = 2Output: 2.598Explanation:Area of the isosceles triangle = ((3 * √3) * A * B) / 4.Therefore
4 min read
Find area of the Circle when the area of inscribed Square is given
Given the area of a square inscribed in a circle as N, the task is to calculate the area of a circle in which the square is inscribed. Examples: Input: N = 4 Output: 6.283 Input: N = 10Output: 15.707 Approach: Consider the below image: Let the area of the square is 'A'The side of the square is given by = A**(1/2)A right-angled triangle is formed by
4 min read
Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
Give a rectangle with length l &amp; breadth b, which inscribes a rhombus, which in turn inscribes a circle. The task is to find the radius of this circle.Examples: Input: l = 5, b = 3 Output: 1.28624 Input: l = 6, b = 4 Output: 1.6641 Approach: From the figure, it is clear that diagonals, x &amp; y, are equal to the length and breadth of the recta
4 min read
Calculate area and height of an isosceles triangle whose sides are radii of a circle
Given integers R and [Tex]\alpha [/Tex]representing the radius of a circle and the angle formed at the center O by the sector AB (as shown in the figure below), the task is to find the height and area of the triangle formed by connecting the points A, B, and O if possible. Otherwise, print "Not possible". Examples: Input: R = 5, [Tex]\alpha [/Tex]=
6 min read
Largest trapezoid that can be inscribed in a semicircle
Given a semicircle of radius r, the task is to find the largest trapezoid that can be inscribed in the semicircle, with base lying on the diameter.Examples: Input: r = 5 Output: 32.476 Input: r = 8 Output: 83.1384 Approach: Let r be the radius of the semicircle, x be the lower edge of the trapezoid, and y the upper edge, &amp; h be the height of th
4 min read
Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
Given here is an ellipse with axes length 2a and 2b, which inscribes a rectangle of length l and breadth h, which in turn inscribes a triangle.The task is to find the area of this triangle.Examples: Input: a = 4, b = 3 Output: 12 Input: a = 5, b = 2 Output: 10 Approach: We know the Area of the rectangle inscribed within the ellipse is, Ar = 2ab(Ple
4 min read
Find area of the larger circle when radius of the smaller circle and difference in the area is given
Given two integers r and d where r is the radius of the smaller circle and d is the difference of the area of this circle with some larger radius circle. The task is to find the area of the larger circle.Examples: Input: r = 4, d = 5 Output: 55.24 Area of the smaller circle = 3.14 * 4 * 4 = 50.24 55.24 - 50.24 = 5Input: r = 12, d = 3 Output: 455.16
4 min read
Program to calculate area of an Circle inscribed in a Square
Given the side of a square. The task is to find the area of an inscribed circle in a square.Examples: Input : a = 8 Output : Area of an inscribed circle: 50.24 Input : a = 12.04 Output : Area of an inscribed circle: 113.795 Given a square i.e. all sides of a square are of equal length and all four angles are 90 degrees. Below diagram depicts an ins
4 min read
Area of circle inscribed within rhombus
Given a rhombus with diagonals a and b, which contains an inscribed circle. The task is to find the area of that circle in terms of a and b.Examples: Input: l = 5, b = 6Output: 11.582 Input: l = 8, b = 10Output: 30.6341 Approach: From the figure, we see, the radius of inscribed circle is also a height h=OH of the right triangle AOB. To find it, we
4 min read
three90RightbarBannerImg