Skip to content

Calculus UDFs (methods_udfs / m)

High-performance calculus functions providing exact symbolic anti-derivatives, auto-splitting bounded areas, and instant method marks.

methods_udfs\avg_val_roc(f, x, a, b)

  • f: Function expression \(f(x)\)
  • x: Independent variable
  • a: Interval lower bound
  • b: Interval upper bound

Exam question example:

2025 VCAA Exam 2 Section B Question 2b-c 3 marks

A passenger gondola rotates such that its height above the ground in metres is given by $h(t) = -60\cos\left(\frac{\pi t}{15}\right) + 75$ for $t \in [0, 7.5]$.

i. Find the average height of the gondola above the ground over the first 7.5 minutes, in metres.

ii. Find the average rate of change of the height of the gondola over the interval $[0, 7.5]$.

CAS Output:

1.1 *Doc1
m\avg_val_roc$\left(-60\cos\left(\frac{\pi t}{15}\right)+75, t, 0, 7.5\right)$

$\text{M1: Avg Val} = \frac{1}{b-a}\int_a^b f(x)\,dx$
$\text{M1: Avg ROC} = \frac{f(b)-f(a)}{b-a}$
$$\begin{bmatrix} & \text{Exact} & \text{4dp} \\ \text{Avg Val} & \frac{15(5\pi - 8)}{\pi} & 36.8310 \\ \text{Avg ROC} & 8 & 8.0000 \\ \Delta x & 7.5 & 7.5000 \\ \Delta y & 60 & 60.0000 \end{bmatrix}$$
Done

methods_udfs\bounded_area(f, g, x, xmin, xmax)

  • f: Upper or first curve expression \(f(x)\)
  • g: Lower or second curve expression \(g(x)\) (use 0 for \(x\)-axis)
  • x: Integration variable
  • xmin: Lower integration limit
  • xmax: Upper integration limit

Exam question example:

2022 VCAA Exam 2 Section B Question 4f 3 marks

Let $f(x) = \sin(x) + 1$ and $g(x) = \frac{1}{2\pi^2}x^3 - \frac{3}{2\pi}x^2 + x + 1$ for $x \in [0, 2\pi]$.

Find the total area of the regions enclosed between the graphs of $y = f(x)$ and $y = g(x)$ over the interval $[0, 2\pi]$.

CAS Output:

1.1 *Doc1
m\bounded_area$\left(\sin(x)+1, \frac{1}{2\pi^2}x^3 - \frac{3}{2\pi}x^2 + x + 1, x, 0, 2\pi\right)$

$\text{M1: } \int_0^\pi (f-g)\,dx = 2 - \frac{\pi^2}{8}$
$\text{M1: } \int_\pi^{2\pi} (g-f)\,dx = 2 - \frac{\pi^2}{8}$
$$\begin{bmatrix} & \text{Exact} & \text{4dp} \\ \text{Area} & 4 - \frac{\pi^2}{4} & 1.5326 \\ \text{Signed} & 0 & 0.0000 \end{bmatrix}$$
Done

methods_udfs\integ_by_recog(bigf, g, x, xmin, xmax)

  • bigf: Known anti-derivative or differentiated function \(F(x)\)
  • g: Target integrand \(g(x)\) to be integrated
  • x: Integration variable
  • xmin: Lower bound for definite evaluation
  • xmax: Upper bound for definite evaluation

Exam question example:

2022 VCAA NHT Exam 2 Section B Question 3c 3 marks

Given that $\frac{d}{dx}\left(x\log_e(x)\right) = 1 + \log_e(x)$, use integration by recognition to find the exact value of $\int_1^e \log_e(x)\,dx$.

CAS Output:

1.1 *Doc1
m\integ_by_recog$\left(x\ln(x), \ln(x), x, 1, e\right)$

$\text{M1: } F'(x) = (1)\cdot g + (1)$
$\int g\,dx = x\ln(x) - x + c$
$$\begin{bmatrix} & \text{Exact} & \text{4dp} \\ c_1, h & 1 & 1 \\ \Delta F(x) & e & 2.7183 \\ \int h\,dx & e - 1 & 1.7183 \\ \int g\,dx & 1 & 1.0000 \end{bmatrix}$$
Done

methods_udfs\interval_minmax(f, var, xmin, xmax)

  • f: Function expression \(f(x)\)
  • var: Independent variable
  • xmin: Domain interval lower bound
  • xmax: Domain interval upper bound

Exam question example:

2023 VCAA Exam 2 Section B Question 1a 2 marks

A rain gutter has cross-sectional area $A(w) = w(12 - 2w)$ where $w \in [0, 6]$ is the width in centimetres.

Find the maximum cross-sectional area of the gutter and the value of $w$ for which this occurs.

CAS Output:

1.1 *Doc1
m\interval_minmax$\left(w(12 - 2w), w, 0, 6\right)$

$\text{M1: } f'(w) = 12 - 4w = 0$
$$\begin{bmatrix} & x(\text{Ex}) & y(\text{Ex}) & y(\text{4d}) & \text{Src} \\ \textbf{MAX} & 3 & 18 & 18.0000 & f'=0 \\ \textbf{MIN} & 0 & 0 & 0.0000 & \text{EndL} \end{bmatrix}$$
Done

methods_udfs\linear_u_sub(int_val, m, c, a, k, x1, x2)

  • int_val: Given value of integral \(I = \int_{u_1}^{u_2} f(u)\,du\)
  • m: Linear slope multiplier \(m\) in \(u = mx + c\)
  • c: Linear shift constant \(c\) in \(u = mx + c\)
  • a: External coefficient \(a\) in \(a\int f(mx+c)\,dx\)
  • k: Constant term \(k\) added to the integrand
  • x1: New definite lower bound \(x_1\)
  • x2: New definite upper bound \(x_2\)

Exam question example:

2023 VCAA NHT Exam 2 Section A Question 18 1 mark

If $\int_1^5 f(u)\,du = 3$, find the value of $\int_0^2 \left(5f(2x + 1) - 4\right)\,dx$.

CAS Output:

1.1 *Doc1
m\linear_u_sub$\left(3, 2, 1, 5, -4, 0, 2\right)$

$\text{M1: } u \in [1, 5], \quad du = 2\,dx$
$$\begin{bmatrix} \text{Part} & \text{Exact} & \text{4dp} \\ [u_1, u_2] & \{1, 5\} & \{1.0, 5.0\} \\ \frac{a}{m}\cdot I & \frac{15}{2} & 7.5000 \\ \int k\,dx & -8 & -8.0000 \\ \text{Total} & -\frac{1}{2} & -0.5000 \\ \text{Swap} & -\frac{31}{2} & -15.5000 \end{bmatrix}$$
Done

methods_udfs\newton_method(f, x, x0, n)

  • f: Function expression \(f(x)\) whose root is sought
  • x: Independent variable
  • x0: Initial approximation \(x_0\)
  • n: Number of Newton-Raphson iterations to perform

Exam question example:

2025 VCAA Exam 2 Section B Question 3c 2 marks

Use Newton's method with initial estimate $x_0 = 0$ to find the next three approximations $x_1, x_2, x_3$ to the solution of $2^x - x^2 = 0$.

CAS Output:

1.1 *Doc1
m\newton_method$\left(2^x - x^2, x, 0, 3\right)$

$\text{M1: } f'(x) = 2^x\ln(2) - 2x$
$$\begin{bmatrix} k & \text{Exact} & \text{4dp} & \text{3dp} & f' \\ 0 & 0 & 0.0000 & 0.000 & 0.6931 \\ 1 & -\frac{1}{\ln(2)} & -1.4427 & -1.443 & 3.2536 \\ 2 & -0.9996 & -0.9996 & -1.000 & 2.3456 \\ 3 & -0.7725 & -0.7725 & -0.773 & 1.9568 \end{bmatrix}$$
Done

methods_udfs\stat_pts_poi(f, var)

  • f: Function expression \(f(x)\)
  • var: Independent variable

Exam question example:

2021 VCAA NHT Exam 2 Section B Question 1a-b 4 marks

Let $f(x) = \frac{x}{x^2+1}$ for $x \in \mathbb{R}$.

a. Find the coordinates of the stationary points of $f$ and state their nature.

b. Find the coordinates of all points of inflection of the graph of $f$.

CAS Output:

1.1 *Doc1
m\stat_pts_poi$\left(\frac{x}{x^2+1}, x\right)$

$\text{M1: } f'(x) = \frac{1-x^2}{(x^2+1)^2} \quad\Big|\quad f''(x) = \frac{2x(x^2-3)}{(x^2+1)^3}$
$$\begin{bmatrix} x(\text{Ex}) & y(\text{Ex}) & x(\text{4d}) & y(\text{4d}) & \text{Type} \\ -1 & -\frac{1}{2} & -1.0000 & -0.5000 & \textbf{MIN} \\ 1 & \frac{1}{2} & 1.0000 & 0.5000 & \textbf{MAX} \\ 0 & 0 & 0.0000 & 0.0000 & \text{R-POI} \\ -\sqrt{3} & -\frac{\sqrt{3}}{4} & -1.7321 & -0.4330 & \text{F-POI} \\ \sqrt{3} & \frac{\sqrt{3}}{4} & 1.7321 & 0.4330 & \text{F-POI} \end{bmatrix}$$
Done

methods_udfs\tangent_normal(f, var, a)

  • f: Function expression \(f(x)\)
  • var: Independent variable
  • a: \(x\)-coordinate of contact point \(x = a\)

Exam question example:

2021 VCAA NHT Exam 2 Section B Question 1e 2 marks

Find the equations of the tangent line and the normal line to the graph of $y = \frac{x}{x^2+1}$ at $x = 0$, and find all axis intercepts.

CAS Output:

1.1 *Doc1
m\tangent_normal$\left(\frac{x}{x^2+1}, x, 0\right)$

$\text{Tan: } y = x \quad\Big|\quad \text{Nrm: } y = -x$
$$\begin{bmatrix} & \text{Exact} & \text{4dp} \\ y(a) & 0 & 0.0000 \\ f'(a) & 1 & 1.0000 \\ \text{Tan } y & x & x \\ \text{T } y\text{-int} & 0 & 0.0000 \\ \text{T } x\text{-int} & 0 & 0.0000 \\ \text{T hits} & \{0\} & \{0.0\} \\ \text{Nrm } y & -x & -x \\ \text{N } y\text{-int} & 0 & 0.0000 \\ \text{N } x\text{-int} & 0 & 0.0000 \end{bmatrix}$$
Done

methods_udfs\trapezoid_rule(f, var, a, b, n)

  • f: Function expression \(f(x)\)
  • var: Independent variable
  • a: Interval lower bound
  • b: Interval upper bound
  • n: Number of equal strips (trapeziums)

Exam question example:

2021 VCAA Exam 2 Section B Question 2c 2 marks

Use the trapezoidal rule with 2 strips of equal width to approximate the value of $\int_0^1 (x^3 + 1)\,dx$. State the percentage error of this approximation.

CAS Output:

1.1 *Doc1
m\trapezoid_rule$\left(x^3+1, x, 0, 1, 2\right)$

$\text{M1: } h = \frac{1}{2}, \quad n = 2$
$$\begin{bmatrix} \text{Rule} & \text{Exact} & \text{4dp} & \text{Err} \\ \text{Left} & \frac{9}{8} & 1.1250 & -0.1250 \\ \text{Right} & \frac{13}{8} & 1.6250 & 0.3750 \\ \text{Trapz} & \frac{21}{16} & 1.3125 & 0.0625 \\ \text{Exact} & \frac{5}{4} & 1.2500 & 0.0000 \end{bmatrix}$$
Done