In the previous lesson, you saw how the

`algebra`

function knows how to crunch algebraic
symbols (x, y, z, etc.) for you, in figuring out exponents.
Let's use this more now to raise polynomials to a power. Remember, for instance the F.O.I.L. method (first, outer, innner, last)? This allows you to handle something like $(x+a)^2$, which is $(x+a)(x+a)$, which comes out to be $x^2+2a+a^2$.

The `algebra`

function allows you to handle F.O.I.L. problems, and then some. Give it a try below.

Type your code here:

See your results here:

This will find the answer to $(x+2)^2$.

You can try all kinds of expression with this (ones you wouldn't dare do by hand), like:

- $(x+2)^5$
- $(x-2a+4b-y)^2$
- $(2x-4y)^3$
- $(x+5)(x-5)$
- $(x+5)^{20}$ (That's right! To the 20th power!)

Does your code work? Want to run it on your iPhone?

Here's your code:

- Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.
- Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into
this page
- Then click the "Use on iPhone" button that you'll see.