Algebra & Calculus

Some Basic Algebra

Log[E^3]

Log[2,8]

Factor[x^2-4]

Factor[x^2-5]

"Factor" factors a polynomial with integer coefficients over the integers only!

Factor[x^2-5.]

Factor[x^2+4]

Factor[x^2+4,Extension->I]

Factor[x^2+4,GaussianIntegers->True]

Factor[x^5+3x^3-4x^2+8x-8]

Solve[x^5+3x^3-4x^2+8x-8==0,x]

Solve[a x^2+b x+c==0,x]

Solve[a x^2+b x +c ==0,a]

Solve[{x^2+y^2==1,y==2x},{x,y}]

Solve[Exp[x]==5x,x]

NSolve[Exp[x]==5x,x]

"FindRoot " uses something like Newton's Method to find ONE root of an equation.

FindRoot[Exp[x]==5x,{x,0,2}]

Some Basic Calculus

Integrate[x^7 Sin[2x],x]

Integrate[x^7 Sin[2x],{x,0,5}]

Integrate[x^2 Sin[x+y],x]

Integrate[x^2 Sin[x+y],{x,0,3},{y,1,x}]

Integrate[Exp[Cos[x^2]],{x,0,5}]

NIntegrate[Exp[Cos[x^2]],{x,0,5}]

D[x^k,x]

Log'[x]

D[x^k,{x,2}]

D[x^2y+y^3,x]

D[D[f[x,y],y],x]==D[D[f[x,y],x],y]

D[Integrate[f[x],x],x]

Integrate[D[f[x],x],x]

DSolve[x''[t]+4x[t]==0,x[t],t]

DSolve[{x''[t]+4x[t]==0,x[0]==1,x'[0]==2},x[t],t]

To graph a derivative directly, the derivative must be enclosed in an “Evaluate” statement:

Plot[Evaluate[D[x^3,x]],{x,0,2}]

Try It Yourself!

1. Graph the function f(x)=(x^2)cos(2x) and its first derivative on the interval [0,2π] in the the same coordinate system. (see the command above)

2. Find all points in the interval (0,π) where the first derivative of f(x)=(x^2)sin(2x+1) equals 0. Which of these is the location of a local minimum (maximum)?

3. Find the smallest positive value of  a such that the integral over the interval from 0 to a of the function f(x)=(x^3)sin(x)  equals 1. If you can’t find an exact answer, try to find an approximation for a.