...
Next, decide on the type of regression. If you want to do a linear regression, the equation would take the form {\displaystyle
}. 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 }
" with " Mathinline |
---|
body | --uriencoded--y_%7B1%7D |
---|
|
", "" with " Mathinline |
---|
body | --uriencoded--x_%7B1%7D |
---|
|
", and "" with . For example, to do a linear regression, you would enter
{\displaystyle y_{1} Mathinline |
---|
body | --uriencoded--y_%7B1%7D\sim mx_ |
---|
|
{1}}. This is saying: "find the constant values m and b that best satisfy
{\displaystyle } for every {\displaystyle x} and {\displaystyle y}for every and in my table, where
{\displaystyle {1}} and {\displaystyle and {1}}". 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 {c>4}}.
...
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 >=}
, ) and then a value. For example,
{\displaystyle 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
}, and an inequality
{\displaystyle }. Notice the use of
{\displaystyle x} instead of {\displaystyle t} instead of . Desmos is picky about variables, and for inequalities it implicitly defines
and
as the input and output.
...
We can use this powerful tool in tandem with restrictions. To graph the area between functions {\displaystyle
} and {\displaystyle and }, 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\ |
|
}}.
...
Built-in Functions and Symbols
...
Input | Result | Explanation |
---|
theta | | A variable, like |
Constants
Input | Result | Explanation |
---|
pi | | The constant 3.14... |
tau Image Removed | | The constant 6.28... |
e | Image Removed | The constant 2.71... |
Exponent and Log Functions
Input | Result | Explanation |
---|
exp(x) | exp(x) | |
ln(x) | ln(x) | The natural log of x |
log(x) | log(x) | The log (base 10) of x |
log_n(x) Image Removed | | The log (base n) of x |
x^n Image Removed | | x to the nth power |
sqrtx | | 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
...