
Triangle $ABC$ is a right triangle with sides $AB$, $BC$ and $AC$.
$a$ is the length of $AB$.
$b$ is the length of $BC$.
$c$ is the length of $AC$.
If $a = 3$, and $b = 4$, we can use Pythagoras' theorem in order to calculate the length of $c$ (although, in this instance, we have a Pythagorean triple).
Since $a^2 + b^2 = c^2$:
$$c = \sqrt{a^2 + b^2} = \sqrt{9 + 16} = \sqrt{25} = 5$$
Now that we have calculated $c$, we can derive an equation for the line by finding its gradient.
As $\displaystyle m = \frac{\delta y}{\delta x}, m = \frac{a}{b} = \frac{3}{4}$, and the equation of the line $AC$ is $y = \dfrac{3}{4}x$.
With this equation, we can find the integral between $0$ and $4$ (as $b$ is equal to $4$), and prove that:
$$\frac{1}{2}ab \equiv \int_0^b \! f(x) \, \mathrm{d}x$$
The integral of $\displaystyle\int_0^4 \! f(x) \, \mathrm{d}x$ where $f(x) = \dfrac{3}{4}x$ is equal to $\dfrac{3x^2}{8}$.
Substituting $0$ and $4$ into the integral, we get $\dfrac{48}{8} = 6$.
This is the correct area of the triangle, and therefore $\displaystyle\dfrac{1}{2}ab \equiv \int_0^b \! f(x) \, \mathrm{d}x$ when calculating the area of a right triangle.
Thank you for reading, and I would appreciate it if you could comment below what you think of this post, as it may help me in the future.
Remember: a line that passes through the origin and a given point $(b,a)$ has a slope $\frac{a}{b}$. Hence, the linear equation that has that slope would be $f(x) = \frac{ax}{b}$. Hence, consider the following:
$$\int_0^b f(x)dx = \int_0^b \frac{ax}{b}dx= \bigg[\frac{ax^2}{2b}\bigg]_0^b = \frac{ab^2}{2b}=\frac{1}{2}ab$$