Numbers and expressions
- Build-in constants:
- pi - This gives the value 3.14159265358979...
- e - This gives 2.71828182845905...
- i - This is the imaginary number \(\sqrt{-1}\).
- Mathematical operators available in WeBWorK:
- + (Addition), - (Subtraction)
- Multiplication can be indicated by *, a space, or sometimes by juxtaposition.
- e.g. 2x, 2 x, 2*x mean the same thing
- e.g. 2 3 and 2*3 are both 6, but 23 means 23.
- / (Division)
- ^ (Exponentiation)
- 4^.5 means \(4^{0.5}\), which is 2.
- Use parentheses to specify the order of operation when applicable.
- e.g. (1+2)/(3(4+5)) means \(\dfrac{1+2}{3(4+5)}\).
- e.g. 1/2x is the same as 1/2*x, which means \(\dfrac{1}{2}x\). To represent \(\dfrac{1}{2x}\), input 1/(2x) or 1/2/x.
- Use the "Preview Button" to see exactly how your entry looks.
- e.g. tell the difference between 1+2/3*4 and (1+2)/(3*4) by clicking the "Preview Button".
Functions
- Square root function
- Absolute value function
- Exponential and logarithmic functions
- exp( ), e.g. both exp(x) and e^x mean \(e^x\)
- Both ln( ) and log( ) indicate the natural logarithm
- logten( ) indicates the logarithm base 10
- ln( )/ln(b) indicates the logarithm base \(b\).
- Trigonometric functions (in radian)
- cos( ), sin( ), tan( ), sec( ), csc( ), cot( )
- Inverse trigonometric functions (also in radian)
- Inverse sine function can be indicated by asin( ) or arcsin( )
- Same for other inverse trigonometric functions. e.g. acos( ) or arccos( ), atan( ) or arctan( ), etc.
- Factorial function
- ! or fact( ), e.g. both 4! and fact(4) mean \(4\times 3\times 2\times 1 = 24\).
- For more information, refer to functions and syntax.
Vectors
- Use angle brackets and commas to input vectors.
- e.g. <1, 2, 3> represents the row vector \(\left[1,\, 2,\, 3\right]\) or the column vector \(\begin{bmatrix} 1\\2\\3 \end{bmatrix}\).
- Enter exact values rather than decimal approximations unless otherwise stated.
- e.g. enter \(\begin{bmatrix}\tfrac{1+\sqrt{2}}{3} \\ 4\ln 5 \\ \tfrac{6}{7}\end{bmatrix}\) as <(1+sqrt(2))/3, 4*ln(5), 6/7> rather than <0.804738, 6.437752, 0.857143>.
- The \(\mathbf{ijk}\)-notation can sometimes be used to represent vectors in 2D or 3D space.
- i + 2j means \(\begin{bmatrix}1\\2\end{bmatrix}\) or \(\begin{bmatrix}1\\2\\0\end{bmatrix}\), depending on situations.
- i + 2j + 3k means \(\begin{bmatrix}1\\2\\3\end{bmatrix}\).
Matrices
- Use square brackets and commas to input matrices. Put a pair of square brackets around each row. Then use commas to separate the rows. Finally put another pair of square brackets around all the rows.
- e.g. [[1,2], [3,4], [5,6]] represents the matrix \(\begin{bmatrix} 1&2\\3&4\\5&6 \end{bmatrix}\).
- Enter exact values rather than decimal approximations unless otherwise stated.
- e.g. enter \(\begin{bmatrix} \tfrac{1}{3} & \tfrac{2}{3} \\ 1 & \tfrac{4}{3}\end{bmatrix}\) as [[1/3,2/3], [1,4/3]] or (1/3)*[[1,2], [3,4]] rather than [[0.333333,0.666667], [1, 1.333333]].