Versions Compared

Key

  • This line was added.
  • 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
bodyy=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
bodyy
" with "
Mathinline
body--uriencoded--y_%7B1%7D
", "
Mathinline
bodyx
" 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
bodyy=mx+b
} for every {\displaystyle x} and {\displaystyle y}
for every 
Mathinline
bodyx
 and 
Mathinline
bodyy
 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<x<8\right\%7D
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
body3x<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
bodyA(t)
}
, and an inequality {\displaystyle
Mathinline
body0<y<A(x)
}
. Notice the use of {\displaystyle x} instead of {\displaystyle t}
Mathinline
bodyx
 instead of 
Mathinline
bodyt
. Desmos is picky about variables, and for inequalities it implicitly defines
Mathinline
bodyx
and
Mathinline
bodyy
as the input and output.

...

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

Mathinline
bodyf(x)
} and {\displaystyle
 and 
Mathinline
bodyg(x)
}
, all we have to do is type {\displaystyle
Mathinline
body--uriencoded--f\left(x\right)<g\left(x\right)\left\
{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
alignmentcenter
\pi

The constant 3.14...

tau

Image Removed
Mathblock
alignmentcenter
\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
alignmentcenter
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)

Stats and Probability Functions

...