Algebra with Mathematica

Functions

So normally, we write functions as y=f(x), here x is the independent variable, and f is the dependent variable.  So for example, we might consider the quadratic function f(x) = 3(x^2)+3x-1.

f[x_] = 3x^2+3x-1

f[0]

f[1]

f[w]

f[2]

z=2

f[z]

Clear[z]

f[z]

f[1+x]

Expand[f[1+x]]

Solve[f[x]== 0,x]

N[%]

NSolve[f[x]==0,x]

Solve[f[x]==1,x]

g[x_] = 2x^2+2x-1

Solve[f[x]==g[x],x]

Plot[{f[x],g[x]},{x,-2,1}]

Solve[g[x]==0,x]

Reduce[g[x]>f[x],x]

Reduce[g[x]<f[x],x]

Reduce[g[x]≠ f[x],x]

Functions of more  than 1 variable

F[x_,y_] = 3*x-4y+6;
G[x_,y_] = 2*x+6*y-1;

F[0,0]

G[0,0]

Solve[F[x,y]==0,y]

Solve[G[x,y]==0,y]

Solve[F[x,y]==G[x,y],{x,y}]

Solve[{F[x,y]==0,G[x,y]==0},{x,y}]

N[%]

F[x,y]/.{x->-(16/13),y->(15/26)}

G[x,y]/.{x->-(16/13),y->(15/26)}