Freshman Seminar

Ken Levasseur (Kenneth_Levasseur@uml.edu)

October 2019

A few examples from courses most math majors take.

Calculus I/IA/IB

Differentiate  and plot a function.

f=Function[x,x Sin[x]]

f'

Plot[{f[x],f'[x]},{x,0,2Pi}]

Calculus II

Integrate an expression, indefinite and definite.

y=x^2 E^(-x)

Evaluate an infinite series.

Sum[(2/3)^n,{n,0,∞}]

A Taylor series

Series[Cos[x],{x,0,4}]

Calculus III

u={4,-1,1};
v={1,1,2};
w={2,-1,t};

u.v

Solve[u.w==0,t]

Graphics3D[{Arrow[{{0,0,0},u}],Arrow[{{0,0,0},v}]}]

Clear[x,y]

z=x Cos[x]+ y Sin[x]

Discrete Structures

Binary digits of a number

IntegerDigits[1234567,2]

The number of possible 5 card poker hands:

Binomial[52,5]

A recursive definition

f[0]=0;f[1]=1;
f[n_]:=f[n]=f[n-1]+f[n-2]

Table[f[i],{i,0,10}]

f[{0,1,2,3}]

Linear Algebra

Linear Equations

Clear[x,y,z]

Solve[{x+y+z==4,x+2y-z==5,x-y-z==0},{x,y,z}]

Matrix Equations

A=(({{2, -1, 0}, {-1, 3, -1}, {0, -1, 4}}))

Solve[A.{x,y,z}=={3,4,5},{x,y,z}]

Inverse[A]

Differential Equations

Clear[x,t]

DSolve[x'[t]==-2x[t]+t^2,x[t],t]

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

x[t_]:=(1/4) (E^(-2 t)) (3+(E^(2 t))-2 (E^(2 t)) t+2 (E^(2 t)) (t^2))

Plot[x[t],{t,0,5}]

Probability & Statistics

Distribution of probabilities for the roll of a fair die:

roll= DiscreteUniformDistribution[{1,6}]

RandomVariate[roll]

PDF[roll]

twodie=Total[RandomVariate[roll,2]]

data=Table[Total[RandomVariate[roll,2]],{1000}];

Mean[data]//N

Histogram[data]