# Page Comparison

## Key

• This line was removed.
• Formatting was changed.

...

Next, decide on the type of regression. If you want to do a linear regression, the equation would take the form {\displaystyle

Mathinline
body y=mx+b
}
. If you want a quadratic regression, the equation would look like {\displaystyle y=ax^{2}
Mathinline
body --uriencoded--y=ax%5e%7B2%7D+bx+c
}
. The enterprising student can extrapolate this to any form they would like, such as {\displaystyle y=e^{m}x+bx}as
Mathinline
body --uriencoded--y=e%5e%7Bm%7Dx+bx
.

After you have decided the form your equation should take, substitute "{\displaystyle y}" with "{\displaystyle y_{1}}", "{\displaystyle x}" with "{\displaystyle x_{1}}", and "{\displaystyle =}" with {\displaystyle \sim }

Mathinline
body y
" with "
Mathinline
body --uriencoded--y_%7B1%7D
", "
Mathinline
body x
" with "
Mathinline
body --uriencoded--x_%7B1%7D
", and "
Mathinline
body =
" with
Mathinline
body \sim
. For example, to do a linear regression, you would enter {\displaystyle y_{1}
Mathinline
body --uriencoded--y_%7B1%7D\sim mx_
{1}
 %7B1%7D+b
}
. This is saying: "find the constant values m and b that best satisfy {\displaystyle
Mathinline
body y=mx+b
} for every {\displaystyle x} and {\displaystyle y}
for every
Mathinline
body x
and
Mathinline
body y
in my table, where {\displaystyle
Mathinline
body --uriencoded--x=x_
{1}} and {\displaystyle
 %7B1%7D
and
Mathinline
body --uriencoded--y=y_
{1}}"
 %7B1%7D
. See the examples below for a demonstration.

...

It can be useful to restrict the domain or range of a function. To do this, add a restriction of the form {\displaystyle \left\{2<x<8\right\}} directly

Mathinline
body --uriencoded--\left\%7B2
directly onto the end of a function. This works with any variable: for a function of {\displaystyle c} where c should be greater than 4, type {\displaystyle
Mathinline
body --uriencoded--\left\
{c>4
 %7Bc>4\right\
}}
 %7D
.

...

### Inequalities

Desmos also has the capability to graph inequalities. Simple inequalities are easy: type an expression followed by a comparison sign (e.g. {\displaystyle <}, {\displaystyle >=}

Mathinline
body <
Mathinline
body >=
) and then a value. For example, {\displaystyle 3x<4}
Mathinline
body 3x<4
. A slightly more complicated example might be {\displaystyle x^{2}>y>2}
Mathinline
body --uriencoded--x%5e%7B2%7D>y>2

...

You can also use this on functions you define. For example, say you're modeling compound interest, and want to set up an inequality for the space under the curve. To do this, define a function for amount given time, {\displaystyle

Mathinline
body A(t)
}
, and an inequality {\displaystyle
Mathinline
body 0
}
. Notice the use of {\displaystyle x} instead of {\displaystyle t}
Mathinline
body x
Mathinline
body t
. Desmos is picky about variables, and for inequalities it implicitly defines
Mathinline
body x
and
Mathinline
body y
as the input and output.

...

We can use this powerful tool in tandem with restrictions. To graph the area between functions {\displaystyle

Mathinline
body f(x)
} and {\displaystyle
and
Mathinline
body g(x)
}
, all we have to do is type {\displaystyle
Mathinline
body --uriencoded--f\left(x\right)
{g
 %7Bg\left(x\right)>y>f\left(x\right)\right\
}}
 %7D
.

...

## Built-in Functions and Symbols

...

Input

Result

Explanation

theta

Mathinline
body \theta

A variable, like

### Constants

Input

Result

Explanation

pi

Mathblock
alignment center
\pi

The constant 3.14...

tau Image Removed
Mathblock
alignment center
\tau

The constant 6.28...

e

Mathblock Image Removed
 e

The constant 2.71...

### Exponent and Log Functions

Input

Result

Explanation

exp(x)

exp(x)

Mathinline
body --uriencoded--e%5ex

ln(x)

ln(x)

The natural log of x

log(x)

log(x)

The log (base 10) of x

log_n(x) Image Removed
Mathblock
log_n x

The log (base n) of x

x^n Image Removed
Mathblock
alignment center
x^n

x to the nth power

sqrtx

Mathblock
\sqrt{x}

The square root of x

nthrootx

Mathblock
\sqrt[\leftroot{-3}\uproot{3}n]{x}

The generalized root function.

...

### Trig Functions

sin(x)

arcsin(x) or

Mathinline
body --uriencoded--\sin%5e%7B-1%7Dx

sinh(x)

cos(x)

arccos(x) or

Mathinline
body --uriencoded--\cos%5e%7B-1%7Dx

cosh(x)

tan(x)

arctan(x) or

Mathinline
body --uriencoded--\tan%5e%7B-1%7Dx

tanh(x)

sec(x)

arcsec(x) or

Mathinline
body --uriencoded--\sec%5e%7B-1%7Dx

sech(x)

csc(x)

arccsc(x) or

Mathinline
body --uriencoded--\csc%5e%7B-1%7Dx

csch(x)

cot(x)

arccot(x) or

Mathinline
body --uriencoded--\cot%5e%7B-1%7Dx

coth(x)

...