Skip to content
Tutorials Center
My learning

Topics

Lesson 66 of 68 ยท Practice and Review

Practice Exercises with Solutions

Eighteen graded calculus problems on limits, derivatives, integrals, ODEs and series, each with a worked solution and a sympy check you can run in the browser.

Calculus is learned by doing it. Reading a solution feels like understanding, but only attempting the problem first shows what you actually know. This lesson gives you 18 graded exercises, grouped by topic, with a full worked solution for each and a runnable sympy check at the end of every group.

Use them this way. Cover the solution, solve the problem on paper, then compare. If your answer differs, do not just copy the correct one: find the line where your work diverged, and then run the check. Each problem is marked with a difficulty: (1) a direct application of a rule, (2) a short chain of ideas, (3) a problem that needs a decision about method.

flowchart LR
    L["Limits<br/>factor, conjugate, divide"] --> D["Derivatives<br/>rules, implicit, optimize"]
    D --> I["Integrals<br/>substitution, parts, fractions"]
    I --> O["ODEs<br/>separate, characteristic, factor"]
    D --> S["Series<br/>Taylor, ratio test, telescoping"]

Each group builds on the one before; the series problems reuse derivatives and limits.

Limits

Problem 1 (1). Find the limit as x -> 0 of sin(3x) / x.

Problem 2 (1). Find the limit as x -> infinity of (3x**2 + x) / (x**2 - 5).

Problem 3 (1). Find the limit as x -> 2 of (x**2 - 4) / (x - 2).

Problem 4 (2). Find the limit as x -> 0 of (1 - cos x) / x**2.

Solutions

1. Rewrite the quotient so that it contains the standard limit sin(u)/u -> 1 as u -> 0: sin(3x)/x = 3 * sin(3x)/(3x). As x -> 0, also 3x -> 0, so the limit is 3 * 1 = 3.

2. Divide the top and bottom by the highest power, x**2: (3 + 1/x) / (1 - 5/x**2). As x grows, 1/x and 5/x**2 go to zero, leaving 3/1 = 3. When the degrees match, the limit is the ratio of the leading coefficients.

3. Direct substitution gives 0/0, which is indeterminate. Factor: (x - 2)(x + 2) / (x - 2) = x + 2 for x != 2. The limit is 4.

4. Direct substitution is again 0/0. Multiply the top and bottom by the conjugate 1 + cos x: the numerator becomes 1 - cos**2 x = sin**2 x, so the expression is sin**2 x / (x**2 * (1 + cos x)) = (sin x / x)**2 / (1 + cos x). As x -> 0 this tends to 1**2 / 2 = 1/2.

Derivatives

Problem 5 (1). Differentiate x**2 * e**(3x).

Problem 6 (1). Differentiate ln(sin x).

Problem 7 (2). The circle x**2 + y**2 = 25 passes through (3, 4). Find dy/dx there.

Problem 8 (3). A rectangle has perimeter 40. What width gives the largest area, and what is that area?

Solutions

5. Product rule with u = x**2, v = e**(3x). Then u' = 2x and, by the chain rule, v' = 3e**(3x). So the derivative is 2x*e**(3x) + 3x**2*e**(3x) = x(3x + 2)e**(3x).

6. Chain rule: the outer function is ln, whose derivative is 1/u, and the inner function sin x has derivative cos x. The result is cos x / sin x = cot x.

7. Differentiate both sides with respect to x, remembering that y depends on x: 2x + 2y * y' = 0. Solve: y' = -x/y. At (3, 4) this is -3/4. The tangent slopes downward, which makes sense for a point in the upper right of the circle.

8. Let the width be w. The perimeter is 2w + 2h = 40, so the height is h = 20 - w, and the area is A(w) = w(20 - w). Set A'(w) = 20 - 2w = 0 to get w = 10. Because A'' = -2 < 0, this is a maximum. The area is 10 * 10 = 100: the best rectangle is a square. Check the endpoints too: at w = 0 and w = 20 the area is zero, which is smaller.

Python Check: limits and derivatives

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The limits print 3, 3, 4 and 1/2. The derivative of x**2 * exp(3x) comes back as x*(3*x + 2)*exp(3*x), matching Problem 5, and sympy writes cot x as 1/tan(x). The implicit derivative is -x/y(x), equal to -3/4 at the point, and the optimisation gives width 10 and area 100.

Integrals

Problem 9 (1). Find integral of x * e**(x**2) dx.

Problem 10 (2). Evaluate integral from 0 to pi of x * sin x dx.

Problem 11 (3). Find integral of 1 / (x**2 - 1) dx.

Problem 12 (2). Find the area enclosed between y = x and y = x**3 for 0 <= x <= 1.

Solutions

9. Substitute u = x**2, so du = 2x dx and x dx = du/2. The integral becomes (1/2) * integral of e**u du = e**u / 2 + C, that is e**(x**2)/2 + C. Check by differentiating: d/dx (e**(x**2)/2) = (1/2) * 2x * e**(x**2) = x*e**(x**2).

10. Integration by parts with u = x and dv = sin x dx, so du = dx and v = -cos x:

integral of x sin x dx = -x cos x + integral of cos x dx = -x cos x + sin x.

Evaluate from 0 to pi: at pi this is -pi * (-1) + 0 = pi; at 0 it is 0. The answer is pi. A quick plausibility check: the area is positive and about the size of a triangle of base pi and height around 1.

11. Factor the denominator and use partial fractions: 1/((x - 1)(x + 1)) = A/(x - 1) + B/(x + 1). Multiplying out gives 1 = A(x + 1) + B(x - 1). Setting x = 1 gives A = 1/2, and x = -1 gives B = -1/2. Then

integral = (1/2) ln|x - 1| - (1/2) ln|x + 1| + C = (1/2) ln|(x - 1)/(x + 1)| + C.

12. On [0, 1], x >= x**3, so the line is above the cubic. The area is integral from 0 to 1 of (x - x**3) dx = [x**2/2 - x**4/4] from 0 to 1 = 1/2 - 1/4 = 1/4.

Python Check: integrals

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Sympy prints exp(x**2)/2 for Problem 9 (it omits + C), pi for Problem 10 and 1/4 for Problem 12. For Problem 11 it gives log(x - 1)/2 - log(x + 1)/2, the same thing as the hand answer on the region x > 1 (without absolute values). The partial-fraction line shows the same two coefficients you found by hand, 1/2 and -1/2.

Differential equations

Problem 13 (1). Solve y' = 2y with y(0) = 3.

Problem 14 (2). Solve y'' + 4y' + 3y = 0 with y(0) = 1 and y'(0) = 0.

Problem 15 (3). Solve y' + y = t with y(0) = 1.

Solutions

13. Separate: dy/y = 2 dt, so ln|y| = 2t + c, which gives y = K*e**(2t). The initial condition fixes K = 3, so y = 3*e**(2t).

14. Try y = e**(rt) to get the characteristic equation r**2 + 4r + 3 = 0, which factors as (r + 1)(r + 3) = 0. The roots are -1 and -3, so y = A*e**(-t) + B*e**(-3t). The conditions give A + B = 1 and y'(0) = -A - 3B = 0. The second says A = -3B, so -3B + B = 1 and B = -1/2, A = 3/2. The solution is y = (3/2)e**(-t) - (1/2)e**(-3t). Both exponents are negative, so this is an overdamped decay (see Second-Order Linear ODEs).

15. This is a first-order linear equation. Multiply by the integrating factor e**t: (y*e**t)' = t*e**t. Integrate the right side by parts: integral of t e**t dt = (t - 1)e**t + C. Divide by e**t: y = t - 1 + C*e**(-t). The condition y(0) = 1 gives -1 + C = 1, so C = 2 and y = t - 1 + 2e**(-t). For large t the solution approaches the line t - 1: the transient dies and the forced response remains.

Python Check: differential equations

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Sympy gives 3*exp(2*t) and t - 1 + 2*exp(-t). It writes the second-order result as (3/2 - exp(-2*t)/2)*exp(-t), which expands to your (3/2)e**(-t) - (1/2)e**(-3t). The numerical solver and the formula agree to eight decimals at t = 3 (both 0.0746189).

Series

Problem 16 (1). Write the Maclaurin series of cos(2x) up to the x**4 term.

Problem 17 (2). Find the radius of convergence of sum over n >= 1 of x**n / (n * 3**n).

Problem 18 (3). Find the sum of 1 / (n(n + 1)) for n = 1, 2, 3, ....

Solutions

16. Start from cos u = 1 - u**2/2 + u**4/24 - ... and put u = 2x: 1 - (2x)**2/2 + (2x)**4/24 = 1 - 2x**2 + (16/24)x**4 = 1 - 2x**2 + (2/3)x**4. The substitution is faster and safer than differentiating four times (see Taylor and Maclaurin Series).

17. Use the ratio test on the terms a_n = x**n / (n * 3**n). Then |a_(n+1)/a_n| = |x| * n / (3(n + 1)), which tends to |x|/3. The series converges when |x|/3 < 1, so the radius of convergence is R = 3.

18. Split the term with partial fractions: 1/(n(n + 1)) = 1/n - 1/(n + 1). The sum of the first N terms telescopes: (1 - 1/2) + (1/2 - 1/3) + ... + (1/N - 1/(N + 1)) = 1 - 1/(N + 1). As N -> infinity this tends to 1.

Python Check: series

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The series check prints 1 - 2*x**2 + 2*x**4/3 + O(x**6), the ratio limit 1/3 (so R = 3), and the sum 1. The partial sums 0.90909, 0.990099 and 0.999001 equal 1 - 1/(N + 1) for N = 10, 100, 1000, which is the telescoping formula from your solution.

How to use the checks well

A sympy check is a referee, not a substitute for the work. Three habits make it valuable:

  1. Solve first. If you run the check before attempting the problem, you lose the practice and the useful mistakes.
  2. Check by a different route. Sympy confirming a derivative is good; differentiating your antiderivative by hand as well is better.
  3. Investigate every disagreement. A mismatch usually means either a slip (see Common Mistakes in Calculus and How to Avoid Them) or an equivalent form. Ask sympy to simplify the difference of the two expressions before deciding.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In Problem 3, direct substitution of x = 2 gives 0/0. What should you do?

    0/0 is an indeterminate form: it says nothing about the limit by itself. After cancelling (x - 2) the expression becomes x + 2, whose limit at 2 is 4.
  2. 2. Why do we check the endpoints in the rectangle optimisation problem (Problem 8)?

    The largest value on [0, 20] is either at a critical point or at an endpoint. Here the endpoints give area zero, so the critical point w = 10 is the maximum.
  3. 3. What is the integrating factor for y' + y = t?

    For y' + p(t) y = q(t) the integrating factor is e^(integral of p dt). Here p = 1, so the factor is e^t, and (y e^t)' = t e^t.
  4. 4. The terms of a series satisfy |a(n+1)/a(n)| -> |x|/3. For which x does the ratio test guarantee convergence?

    The ratio test needs the limit to be below 1. |x|/3 < 1 means |x| < 3, so the radius of convergence is 3.

Summary

  • Attempt each problem first, then compare your work with the solution, then run the check.
  • Limits of 0/0 type need factoring, conjugates or the standard limit sin(u)/u -> 1; equal degrees give a ratio of leading coefficients.
  • Differentiate with the product, quotient and chain rules; use implicit differentiation when y is tangled with x, and check endpoints when optimising.
  • Integrals use substitution, parts and partial fractions; verify any antiderivative by differentiating it.
  • First-order linear ODEs use an integrating factor; second-order constant-coefficient ODEs use the characteristic equation.
  • Series problems use known expansions with substitution, the ratio test and telescoping sums.

Next: Interview Questions.