Mathematica Notes: Input & Define a Function
Input a c \frac{a}{c} c a Press [Ctrl]+[/] x a x^a x a Press [Ctrl]+[^] x \sqrt{x} x Press [Ctrl]+[@] Define a function f ( x ) = x 2 + x + 1 f(x)=x^2+x+1 f ( x ) = x 2 + x + 1 Input: f[x_] := x^2 + x + 1 f[1] Output: 3 What difference between f[x_]:= and f[x_]= ? := means delayed assignment, the value will recompute everytime it needed. = means assign value immediately ** =. means clear assignment What difference between f[x_] and f[x] ? input: f[x_] := x^2 + x + 1 f[1] g[y] := x^2 + x + 1 g[1] output: 3 g[1]