1.10.4 Entering Formulas
Special forms for some common symbols. stands for the key .
This is equivalent to Sin[60 Degree].
Here is the long form of the input.
In:= Sin[60 \[Degree]]
You can enter the same input like this.
In:= Sin[60 deg]
Here the angle is in radians.
Special forms for a few operators. Section A.2.7 gives a complete list.
Here the replacement rule is entered using two ordinary characters, as ->.
In:= x/(x+1) /. x -> 3 + y
This means exactly the same.
In:= x/(x+1) /. x \[Rule] 3 + y
As does this.
In:= x/(x+1) /. x 3 + y
In:= x/(x+1) /. x -> 3 + y
The special arrow form is by default also used for output.
In:= Solve[x^2 == 1, x]
Some operators with special forms used for input but not output.
Mathematica understands , but does not use it by default for output.
In:= x ÷ y
The forms of input discussed so far in this section use special characters, but otherwise just consist of ordinary one-dimensional lines of text. Mathematica notebooks, however, also make it possible to use two-dimensional forms of input.
Some two-dimensional forms that can be used in Mathematica notebooks.
You can enter two-dimensional forms using any of the mechanisms discussed in Section 1.10.2. Note that upper and lower limits for sums and products must be entered as overscripts and underscripts—not superscripts and subscripts.
This enters an indefinite integral. Note the use of dd to enter the "differential d".
In:= int f[x] dd x
Here is an indefinite integral that can be explicitly evaluated.
Here is the usual Mathematica input for this integral.
In:= Integrate[Exp[-x^2], x]
This enters exactly the same integral.
In:= \!\( \[Integral] Exp[-x\^2] \[DifferentialD]x \)
Some special characters used in entering formulas. Section 3.10 gives a complete list.
You should realize that even though a summation sign can look almost identical to a capital sigma it is treated in a very different way by Mathematica. The point is that a sigma is just a letter; but a summation sign is an operator which tells Mathematica to perform a Sum operation.
Capital sigma is just a letter.
In:= a + \[CapitalSigma]^2
A summation sign, on the other hand, is an operator.
In:= sum + n=0 % m 1/f[n]
Here is another way to enter the same input.
In:= \!\( \[Sum] \+ \( n = 0 \) \% m 1 \/ f[n] \)
Much as Mathematica distinguishes between a summation sign and a capital sigma, it also distinguishes between an ordinary d and the special "differential d" that is used in the standard notation for integrals. It is crucial that you use this differential —entered as dd—when you type in an integral. If you try to use an ordinary d, Mathematica will just interpret this as a symbol called d—it will not understand that you are entering the second part of an integration operator.
This computes the derivative of .
Here is the same derivative specified in ordinary one-dimensional form.
In:= D[x^n, x]
This computes the third derivative.
Here is the equivalent one-dimensional input form.
In:= D[x^n, x, x, x]