Triangle $ABC$ has $AB=9$ and $BC: AC=40: 41$. What's the largest area that this triangle can have?
Solution 1
First, consider the [triangle](https://artofproblemsolving.com/wiki/index.php/Triangle) in a [coordinate system](https://artofproblemsolving.com/wiki/index.php/Coordinate_system) with [vertices](https://artofproblemsolving.com/wiki/index.php/Vertex) at $(0,0)$, $(9,0)$, and $(a,b)$. Applying the [distance formula](https://artofproblemsolving.com/wiki/index.php/Distance_formula), we see that $\frac{ \sqrt{a^2 + b^2} }{ \sqrt{ (a-9)^2 + b^2 } } = \frac{40}{41}$.
We want to maximize $b$, the height, with $9$ being the base.
Simplifying gives $-a^2 -\frac{3200}{9}a +1600 = b^2$.
To maximize $b$, we want to maximize $b^2$. So if we can write: $b^2=-(a+n)^2+m$, then $m$ is the maximum value of $b^2$ (this follows directly from the [trivial inequality](https://artofproblemsolving.com/wiki/index.php/Trivial_inequality), because if ${x^2 \ge 0}$ then plugging in $a+n$ for $x$ gives us ${(a+n)^2 \ge 0}$).
$b^2=-a^2 -\frac{3200}{9}a +1600=-\left(a +\frac{1600}{9}\right)^2 +1600+\left(\frac{1600}{9}\right)^2$.
$\Rightarrow b\le\sqrt{1600+\left(\frac{1600}{9}\right)^2}=40\sqrt{1+\frac{1600}{81}}=\frac{40}{9}\sqrt{1681}=\frac{40\cdot 41}{9}$.
Then the area is $9\cdot\frac{1}{2} \cdot \frac{40\cdot 41}{9} = \boxed{820}$.

Solution 2
Let the three sides be $9,40x,41x$, so the area is $\frac14\sqrt {(81^2 - 81x^2)(81x^2 - 1)}$ by Heron's formula. By AM-GM, $\sqrt {(81^2 - 81x^2)(81x^2 - 1)}\le\frac {81^2 - 1}2$, and the maximum possible area is $\frac14\cdot\frac {81^2 - 1}2 = \frac18(81 - 1)(81 + 1) = 10\cdot82 = \boxed{820}$. This occurs when $81^2 - 81x^2 = 81x^2 - 1\implies x = \frac {\sqrt {3281}}9$.

Comment
Rigorously, we need to make sure that the equality of the AM-GM inequality is possible to be obtained (in other words, $(81^2 - 81x^2)$ and $(81x^2 - 1)$ can be equal with some value of $x$). MAA is pretty good at generating smooth combinations, so in this case, the AM-GM works; however, always try to double check in math competitions -- the writer of Solution 2 gave us a pretty good example of checking if the AM-GM equality can be obtained.   ~Will_Dai

Solution 3
Let $A, B$ be the endpoints of the side with length $9$. Let $\Gamma$ be the Apollonian Circle of $AB$ with ratio $40:41$; let this intersect $AB$ at $P$ and $Q$, where $P$ is inside $AB$ and $Q$ is outside. Then because $(A, B; P, Q)$ describes a harmonic set, $AP/AQ=BP/BQ\implies \dfrac{\frac{41}{9}}{BQ+9}=\dfrac{\frac{40}{9}}{BQ}\implies BQ=360$. Finally, this means that the radius of $\Gamma$ is $\dfrac{360+\frac{40}{9}}{2}=180+\dfrac{20}{9}$.
Since the area is maximized when the altitude to $AB$ is maximized, clearly we want the last vertex to be the highest point of $\Gamma$, which just makes the altitude have length $180+\dfrac{20}{9}$. Thus, the area of the triangle is $\dfrac{9\cdot \left(180+\frac{20}{9}\right)}{2}=\boxed{820}$

Solution 4 (Involves Basic Calculus)
We can apply Heron's on this triangle after letting the two sides equal $40x$ and $41x$. Heron's gives
$\sqrt{\left(\frac{81x+9}{2} \right) \left(\frac{81x-9}{2} \right) \left(\frac{x+9}{2} \right) \left(\frac{-x+9}{2} \right)}$.
This can be simplified to
$\frac{9}{4} \cdot \sqrt{(81x^2-1)(81-x^2)}$.
We can optimize the area of the triangle by finding when the derivative of the expression inside the square root equals 0.
We have that $-324x^3+13124x=0$, so $x=\frac{\sqrt{3281}}{9}$.
Plugging this into the expression, we have that the area is $\boxed{820}$.
$\textbf{-RootThreeOverTwo}$
~minor $\LaTeX$ edit by Yiyj1

Solution 5
We can start how we did above in solution 4 to get
$\frac{9}{4} * \sqrt{(81x^2-1)(81-x^2)}$.
Then, we can notice the inside is a quadratic in terms of $x^2$, which is
$-81(x^2)^2+6562x^2-81$. This is maximized when $x^2 = \frac{3281}{81}$.If we plug it into the equation, we get $\frac{9}{4} *\frac{9}{4}*\frac{3280}{9} = \boxed{820}$