# Equation

First things first, how might you show a quadratic formula?!?

The `r-equation`

wraps Katex in a web component.
You can inspect the component and try writing a new equation to the `math`

property!

## Updating the Math

To dynamically update the equation there are two ways: (1) you can as usual set the `:math`

property; or (2) you can use the equation in conjunction with `r-display`

and `r-visible`

.
In the example below we are expanding a Taylor Series which uses the `:math`

property to index into an array when you drag a range.

Drag me to expand the Taylor Series:

## Use visible and display

In the example below, we will take some care to make sure that we show the right equation.
For example, try seeing what happens in the equation when

$m$ =

$b$ =

Here we are just directly writing `<r-display>`

directly inside of the equation tags.
This works by ensuring that the formatted output of a display is included in the inner-html `textContent`

of the element for what to render to Katex.
You can use either approach, `:math`

or inner `r-display`

's, however, it is

Made with love by iooxa

Last updated August 5th, 2020