Solutions for a Sample Calculus Exam using Mathematica

Solution

Calculate the indefinite integral:

int1 = ∫(1/(Sqrt[25 (x^2)+36]))\[DifferentialD]x

Verify the answer by differentiation, using D:

Simplify[D[int1, x]]

Solution:

Find the required limit:

(lim_(x->0)) ((x cos(3 x)-x (E^(-(x^2))))/((sin^3)(x)))

This problem can also be done using Series:

Normal[Series[((x cos(3 x)-x (E^(-(x^2))))/((sin^3)(x))),{x,0,0}]]

Solution:

Use Roots to compute the roots of the equation:

r=Roots[(x^4)+64 I x==0,x]

Convert to Cartesian form using ComplexExpand:

ComplexExpand[r]

Solution:

Calculate the indefinite integral:

int2= ∫cos(log(3 t))\[DifferentialD]t

Verify the answer by differentiation:

D[int2, t]

Solution:

The message from Integrate indicates that the integral is divergent on {0, ∞}.

(∫_0^∞)((cos(x))/(x^3))\[DifferentialD]x

As seen below, the integral is divergent on {0, 1} but it converges on {1, Infinity}.

(∫_0^1)((cos(x))/(x^3))\[DifferentialD]x

int3=(∫_1^∞)((cos(x))/(x^3))\[DifferentialD]x

N[int3]

Use NIntegrate to verify the answer numerically:

NIntegrate[((cos(x))/(x^3)),{x,1,∞}]

Solution:

Set up the parametric equations for the curve:

x(t_):=(cos^(-1))(t)

y(t_):=log((Sqrt[1-(t^2)]))

Compute the arc length:

int4= (∫_0^(3/4))(Sqrt[((x'(t))^2)+((y'(t))^2)])\[DifferentialD]t

N[int4]

Verify the answer using numerical integration:

NIntegrate[(Sqrt[((x'(t))^2)+((y'(t))^2)]),{t,0,(3/4)}]

Solution:

An answer is returned without a message indicating that the series is convergent:

sum1=(∑_(n=1)^∞)((sin(n)+(E^(-n)))/(n^(5/4)))

Chop[N[sum1]]

Sum the first 10000 terms of the series to verify the answer:

(∑_(n=1.)^10000)((sin(n)+(E^(-n)))/(n^(5/4)))

Solution:

Use DSolve to solve the ODE:

Clear[x,y]

ode1=x y'(x) + 3 y(x)==cos(x);

sol1=DSolve[ode1,y,x]

Verify the answer by substitution:

Simplify[ode1/.sol1[[1]]]

Solution

Solve the ODE:

ode2=y''(x)-4 y'(x)+3 y(x)==(x^3);

sol2=DSolve[ode2,y,x]

Verify the answer by substitution:

Simplify[ode2/.sol2[[1]]]

Solution:

Use direct numerical integration:

NIntegrate[cos((Sqrt[t])),{t,0,(1/100)}]

Alternatively, use the first three terms in the series for the integrand to calculate the required approximation.

ser =Normal[Series[Cos((Sqrt[t])), {t, 0, 2}]]

Table[(∫_0^(1/100))ser[[i]]\[DifferentialD]t,{i,Length[ser]}]

int5=(∫_0^(1/100))ser\[DifferentialD]t

N[int5]

This example can also be done using exact, symbolic integration.

int6 = (∫_0^(1/100))cos((Sqrt[t]))\[DifferentialD]t

N[int6]

Clear[x,y,t,ser, sum1, int1, int2, int3, int4, int5, int6, r]