Multi-part calculus

Introducing functions in multi-part exercises

We introduced student variables to support algebraic reasoning in multi-part exercises. We will now extend this concept to support calculus, which is about the analysis of functions.

Here are two examples of such multi-part calculus questions.

  • Finding the formula of the tangent to a given function
  • Finding the dimension of a box with maximum volume

We will discuss both examples below.

Example: Formula for the tangent

Consider the following example.

Find the formula of the tangent to f(x)=2x2xf(x)=2x^2-x at coordinates (2,6)(2,6).

The solution to this problem requires the following parts:

  1. Deriving the derivative function f(x)f'(x).
  2. Calculating the slope of the tangent m=f(2)m = f'(2).
  3. Finding the yy-offset, bb, by substituting (x,y)=(2,6)(x,y)=(2,6).
  4. Writing the requested formula y=mx+by=mx+b.

We turn this into a solution model as follows:

Part Description Calculation Marks
f(x)f'(x) the derivative of f(x)f(x) The derivative of x2xx^2-x for xx 1
mm the slope m=f(2)m=f'(2) 1
bb the yy-offset Solve 6=m2+b6=m\cdot 2+b for bb 1
solution the formula of the tangent y=mx+by=m\cdot x+b 1

Now let's create this question in Multistep.

  • Add three new exercise parts and name them f(x)f'(x), mm and bb.
  • In the menu of these part names, check the option student variable.
  • Set the descriptions of the exercise parts as in the above table.
  • Set the tasks corresponding to the calculations in the solution model. Choose tasks Calculus/Differentiate for exercise part f(x)f'(x), Solving equations/Single variable for bb and Simplify for mm.

Exercise part $f'(x)$ Figure: Exercise part f(x)f'(x).

Here is a live example of the problem we just created:

Live example: The multi-part calculus problem.

Function definition as exercise part

This example shows that exercise parts can also define functions and their derivatives. Set the name of the exercise part to the function, including the variable arguments. Do not repeat the function name in the task.


To define function T(t)=21+tT(t)=2\sqrt{1+t}:

  • Set the part name to T(t)T(t)
  • Define the task to Simplify 21+t2\sqrt{1+t}.
  • Make sure to enable the student variable option to make the part name T(t)T(t) available to students.

You can define derivatives in the same way, using a part name such as f(x)f'(x) or dfdx(x)\frac{df}{dx}(x).

A part name like f(x)f'(x) is more than just a name. Algebrakit interprets this as a function definition. To see how powerful this is, consider the following optional student inputs:

Student input Evaluation
y=f(2)x+by=f'(2) x+b Correct intermediate step. Algebrakit understands that f(2)=7f'(2)=7 and b=8b=-8.
f(0)=0f(0)=0 Correct expression, which follows from the definition f(x)=x2xf(x)=x^2-x.
m=f(2)m=f'(2) Correct intermediate step to calculate the slope mm.

Example: A calculus word problem

Let's now create the following word problem:

Folding a box out of a square cardboard You can create a box from a square piece of cardboard by cutting a square from each corner and folding the sides. If the dimensions of the cardboard are 30m×30cm30 m\times 30cm , calculate the value of hh that maximizes the volume V(h)V(h) of the box.

The solution to this problem requires the following parts:

  1. Writing an expression for the width of the box w=302hw=30-2h,
  2. Writing a formula for the volume V(h)=hww=h(302h)2V(h)=h\cdot w\cdot w = h(30-2h)^2,
  3. Deriving the derivative V(h)V'(h),
  4. Solving V(h)=0V'(h)=0, with 0<h<150\lt h \lt 15.

We turn this into a solution model as follows:

Part Description Calculation Marks
ww an expression for the width ww of the box 302h30-2h 1
V(h)V(h) the volume of the box hw2h\cdot w^2 1
V(h)V'(h) the derivative of the volume w.r.t. hh ddhV(h)\frac{d}{dh} V(h) 1
solution the height hh of the box width maximum volume Solve V(h)=0V(h)=0 with domain 0<h<150\lt h \lt 15 1

There is a live example of the problem below. Click the Edit button to see how we made this exercise.

Live example: Finding the dimensions of a box with maximum volume.