# Find the area of largest circle inscribed in ellipse

Given an ellipse, with major and minor axis length 2a & 2b respectively. The task is to find the area of the largest circle that can be inscribed in it.

**Examples:**

Input :a = 5, b = 3Output :28.2743Input :a = 10, b = 8Output :201.062

**Approach :** The maximal radius of the circle inscribed in the ellipse is the minor axis of the ellipse.

So, area of the largest circle = **π * b * b**.

Below is the implementation of the above approach:

## C++

`// CPP program to find ` `// the area of the circle ` `#include <bits/stdc++.h> ` `using` `namespace` `std; ` `#define pi 3.1415926 ` ` ` `double` `areaCircle(` `double` `b) ` `{ ` ` ` `double` `area = pi * b * b; ` ` ` `return` `area; ` `} ` ` ` `// Driver Code ` `int` `main() ` `{ ` ` ` `double` `a = 10, b = 8; ` ` ` `cout << areaCircle(b); ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java Program to find the area ` `// of circle ` ` ` `class` `GFG ` `{ ` ` ` `static` `double` `areaCircle(` `double` `b) ` ` ` `{ ` ` ` ` ` ` ` `// Area of the Reuleaux triangle ` ` ` `double` `area = (` `double` `)` `3.1415926` `* b * b; ` ` ` `return` `area; ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `main(String args[]) ` ` ` `{ ` ` ` `float` `a = ` `10` `,b = ` `8` `; ` ` ` `System.out.println(areaCircle(b)) ; ` ` ` `} ` `} ` ` ` `// This code is contributed by mohit kumar 29 ` |

*chevron_right*

*filter_none*

## Python3

`# Python3 program implementation of above approach ` ` ` `import` `math ` ` ` `# Function to return required answer ` `def` `areaCircle(b): ` ` ` `area ` `=` `math.pi ` `*` `b ` `*` `b ` ` ` `return` `area ` ` ` ` ` `# Driver Code ` `a ` `=` `10` `b ` `=` `8` `print` `(areaCircle(b)) ` ` ` `# This code is contributed by ` `# Sanjit_Prasad ` |

*chevron_right*

*filter_none*

## C#

`// C# Program to find the area ` `// of circle ` `using` `System; ` ` ` `class` `GFG ` `{ ` ` ` `static` `double` `areaCircle(` `double` `b) ` ` ` `{ ` ` ` `// Area of the Reuleaux triangle ` ` ` `double` `area = (` `double` `)3.1415926 * b * b; ` ` ` `return` `area; ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `Main() ` ` ` `{ ` ` ` `float` `b = 8; ` ` ` `Console.WriteLine(areaCircle(b)) ; ` ` ` `} ` `} ` ` ` `// This code is contributed by aishwarya.27 ` |

*chevron_right*

*filter_none*

## PHP

`<?php ` `// PHP program to find the area of the circle ` ` ` `$GLOBALS` `[` `'pi'` `] = 3.1415926; ` ` ` `function` `areaCircle(` `$b` `) ` `{ ` ` ` `$area` `= ` `$GLOBALS` `[` `'pi'` `] * ` `$b` `* ` `$b` `; ` ` ` `return` `$area` `; ` `} ` ` ` `// Driver Code ` `$a` `= 10; ` `$b` `= 8; ` ` ` `echo` `round` `(areaCircle(` `$b` `), 3); ` ` ` `// This code is contributed by Ryuga ` `?> ` |

*chevron_right*

*filter_none*

**Output:**

201.062

## Recommended Posts:

- Area of Largest rectangle that can be inscribed in an Ellipse
- Area of the Largest square that can be inscribed in an ellipse
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Largest ellipse that can be inscribed within a rectangle which in turn is inscribed within a semicircle
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Area of a square inscribed in a circle which is inscribed in a hexagon
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle
- Area of the biggest ellipse inscribed within a rectangle
- Largest triangle that can be inscribed in an ellipse
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Area of decagon inscribed within the circle
- Area of circle inscribed within rhombus
- Area of circle which is inscribed in equilateral triangle
- Area of a circle inscribed in a regular hexagon
- Program to calculate area of an Circle inscribed in a Square

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.