Numerical evaluation of expressions

Sqrt[Pi]

N[Sqrt[Pi]]

Solving equations

Solve[x^2 + 2a == x, x]

sol = NSolve[x^3 + 2 == x]
s=x/. sol[[1]] (*assign the 1st root to variable s; note[[..]]*)

Plotting

Plot[{Sin[x],Cos[x]},{x,0,2Pi},GridLines->Automatic,PlotLegends->"Expressions"]

LogPlot[{x^x, Exp[x], Factorial[x]}, {x, 1, 10},GridLines->Automatic,PlotLegends->"Expressions"] (* semilogy plot *)

LogLinearPlot[Tanh[x],{x,1,100}, GridLines->Automatic]   (* semilogx plot *)

LogLogPlot[{Log[x]^x,x^x},{x,0.1,10}, GridLines->Automatic, PlotLabels->"Expressions"](* loglog plot *)

intensity[r_, theta_] = r * (Cos[theta])^2
PolarPlot[intensity[0.4, theta], {theta, 0, 2*Pi},
AspectRatio->Automatic, PolarGridLines->Automatic,
PolarAxes->Automatic, PolarTicks->{"Degrees",Automatic}] (* Polar plot *)

Derivative

D[Sin[x],{x,3}] (* third derivative *)

Sin'[x] (* first derivative *)

Integration

f[x_]:=Integrate[Exp[-y^3],{y,-x,x}]  (* symbolic integr *)
Plot[f[x],{x,0,3/2},Frame->True,GridLines->Automatic]

f1[x_]:=NIntegrate[Exp[-y^3],{y,0,x}]   (* Numerical int *)
f2[x_]:=NIntegrate[1-Exp[-y^2],{y,0,x}]
Plot[{f1[x],f2[x]},{x,0,2},Frame->True,GridLines->Automatic,PlotLegends->"Expressions"]

Series expansion:

res=Series[Sin[x]/(x+2),{x,0,4}]
Normal[res]

Ordinary differential equations

ode = {y'[x]+y[x]==Sin[x],y[0]==0}
sol = DSolve[ode,y[x],x]
y[x] /. sol[[1]] // Expand  (* Analytic solution *)

Numerical solution of differential equations:

(* Initial value problem *)
ode={y''[x]+y[x]+y[x]^3==0,y[0]==1,y'[0]==0} 
sol=NDSolve[ode,y[x],{x,0,20}]
Plot[y[x]/. sol,{x,0,20},Frame->True,GridLines->Automatic]

(* Boundary value problem *)
ode = {0.01 *y''[x]+0.1*x*y[x]-y[x] + Exp[x]==0,y[0]==2,y[1]==1} 
sol=NDSolve[ode,y[x],{x,0,1}]
Plot[y[x]/. sol,{x,0,1},Frame->True,GridLines->Automatic]

Factorization:

Factor[-2/3-x^3/3+x]

Simplification:

Simplify[Sin[2*x]/Sin[x]]

(x^3-1)/(x-1) // Simplify

Expand symbolic expressions into real and imaginary parts:

f[z_]:=Exp[(2+z)/(3+z)]

ComplexExpand[Re[f[Exp[I*t]]]]//Simplify

ComplexExpand[Im[f[Exp[I*t]]]]//Simplify

Limits

Limit[Sin[x]/x,x->0]

Limit[Sinh[x]/Cosh[x],x->Infinity]