Skip to content

Functions & Algebra UDFs (methods_udfs / m)

High-performance algebra functions for composite domains, functional identities, hybrid continuity, inverses, and simultaneous linear systems.

methods_udfs\composite_dom(f, g, var, df_min, df_max)

  • f: Outer function expression \(f(u)\)
  • g: Inner function expression \(g(x)\)
  • var: Independent variable of \(g(x)\)
  • df_min: Outer function domain lower bound \(\min(\text{dom}(f))\)
  • df_max: Outer function domain upper bound \(\max(\text{dom}(f))\)

Exam question example:

2021 VCAA Exam 2 Section B Question 4a 2 marks

Let $f(x) = 2x^2 + x - 1$ for $x \in \mathbb{R}$ and $g(x) = \sin(x)$ for $x \in \mathbb{R}$.

Explain why the composite function $f(g(x))$ exists, and state its rule.

CAS Output:

1.1 *Doc1
m\composite_dom$\left(2x^2+x-1, \sin(x), x, -\infty, \infty\right)$

$f(g(x)) = 2\sin^2(x) + \sin(x) - 1$
$\text{M1: } \text{ran}(g) \subseteq [-\infty, \infty]$
$$\begin{bmatrix} \text{Cond} & \text{Exact} & \text{4dp} \\ g = \text{min} & \{\} & \{\} \\ g = \text{max} & \{\} & \{\} \\ g' = 0 & \{0, \pi\} & \{0.0000, 3.1416\} \end{bmatrix}$$
Done

methods_udfs\func_identities(f, x)

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

Exam question example:

2024 VCAA Exam 2 Section A Question 12 1 mark

Which one of the following functions satisfies the functional equation $f(x + y) = f(x)f(y)$ for all $x, y \in \mathbb{R}$?

CAS Output:

1.1 *Doc1
m\func_identities$\left(e^{2x}, x\right)$

$$\begin{bmatrix} \text{Identity} & \text{OK} & \text{Diff} \\ f(x+y)=f(x)+f(y) & \text{NO} & 0.7821 \\ f(x+y)=f(x)f(y) & \textbf{YES} & 0.0000 \\ f(xy)=f(x)+f(y) & \text{NO} & 1.4124 \\ f(xy)=f(x)f(y) & \text{NO} & 2.1092 \\ \text{Even } f(-x)=f(x) & \text{NO} & 0.9812 \\ \text{Odd } f(-x)=-f(x) & \text{NO} & -1.8920 \\ \text{Self } f(f(x))=x & \text{NO} & 3.4112 \end{bmatrix}$$
Done

methods_udfs\hybrid_check(f, g, x, c)

  • f: Left branch function \(f(x)\) for \(x \le c\)
  • g: Right branch function \(g(x)\) for \(x > c\)
  • x: Independent variable
  • c: Transition junction point \(x = c\)

Exam question example:

2024 VCAA NHT Exam 2 Section B Question 2d 3 marks

A piecewise function is defined by $h(x) = \begin{cases} x^2 + 2x, & x \le 1 \\ 4x - 1, & x > 1 \end{cases}$.

Determine whether $h$ is continuous and whether $h$ is differentiable at $x = 1$.

CAS Output:

1.1 *Doc1
m\hybrid_check$\left(x^2+2x, 4x-1, x, 1\right)$

$\text{M1 Cont: } 3 = 3 \quad (\text{Continuous})$
$\text{M1 Diff: } 4 = 4 \quad (\text{Smooth})$
$$\begin{bmatrix} x = c & f(c) & g(c) & f-g \\ \text{Cont} & 3 & 3 & 0.0000 \\ \text{Diff} & 4 & 4 & 0.0000 \end{bmatrix}$$
Done

methods_udfs\inverse_func(f, var)

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

Exam question example:

2024 VCAA Exam 2 Section B Question 4d 3 marks

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

Find the rule and domain of $f^{-1}$, and find the coordinates of any points of intersection of $y = f(x)$ and $y = f^{-1}(x)$.

CAS Output:

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

$\text{M1: } x = f(y), \quad \text{dom}(f^{-1}) = \text{ran}(f)$
$f^{-1}(x) = 2^{2/3}(x-2)^{1/3} - 2$
$$\begin{bmatrix} \text{Item} & \text{Exact} & \text{4dp} \\ f'=0 & \{-2\} & \{-2.0000\} \\ f(x)=x & \{0, 2, -4\} & \{0.0, 2.0, -4.0\} \end{bmatrix}$$
Done

methods_udfs\inv_intersect_k(f, x, k)

  • f: Parameterized function expression \(f(x, k)\)
  • x: Independent variable
  • k: Parameter variable

Exam question example:

2024 VCAA Exam 2 Section B Question 4f 2 marks

Let $f(x) = e^{kx}$ for $x \in \mathbb{R}$ where $k > 0$.

Find the values of $k$ for which the graphs of $y = f(x)$ and $y = f^{-1}(x)$ have exactly one point of intersection.

CAS Output:

1.1 *Doc1
m\inv_intersect_k$\left(e^{kx}, x, k\right)$

$$\begin{bmatrix} \text{Condition} & \text{Exact} & \text{Decimal} \\ f=x, f'=1 & x=1 \text{ and } k=e^{-1} & x=1.0 \text{ and } k=0.3679 \\ f=x, f'=-1 & x=1 \text{ and } k=-e & x=1.0 \text{ and } k=-2.7183 \\ f=x, f'=0 & \text{false} & \text{false} \end{bmatrix}$$
Done

methods_udfs\linear_sys_k(e1, e2, x, y, k)

  • e1: First linear equation containing parameter \(k\)
  • e2: Second linear equation containing parameter \(k\)
  • x: First variable
  • y: Second variable
  • k: Parameter variable

Exam question example:

2021 VCAA Exam 2 Section B Question 1b 3 marks

Consider the system of simultaneous linear equations:

\[ \begin{aligned} kx + 3y &= k^2 \\ 2x + (2k+1)y &= 6 - 2k \end{aligned} \]

Find all values of $k$ for which the system has: (i) a unique solution, (ii) no solutions, (iii) infinitely many solutions.

CAS Output:

1.1 *Doc1
m\linear_sys_k$\left(kx + 3y = k^2, 2x + (2k+1)y = 6 - 2k, x, y, k\right)$

$\text{M1 det: } 2k^2 + k - 6 = 0$
$$\begin{bmatrix} \text{Case} & \text{Exact } k & \text{4dp} \\ \det=0 & \{-2, 3/2\} & \{-2.0000, 1.5000\} \\ \text{Inf} & \{3/2\} & \{1.5000\} \\ \text{None} & \{-2\} & \{-2.0000\} \end{bmatrix}$$
Done

methods_udfs\num_solutions_k(f, var, dmin, dmax)

  • f: Function expression \(f(x)\)
  • var: Independent variable
  • dmin: Domain lower bound
  • dmax: Domain upper bound

Exam question example:

2022 VCAA NHT Exam 2 Section A Question 14 1 mark

Find the number of real solutions to the equation $x e^{-x} = k$ for $x \in [0, \infty)$ across different real values of $k$.

CAS Output:

1.1 *Doc1
m\num_solutions_k$\left(x e^{-x}, x, 0, \infty\right)$

$k_{\text{crit}} = \{0, e^{-1}\}$
$$\begin{bmatrix} \text{Range of } k & \text{Test} & \text{\#Sol} \\ k < 0 & -1.0 & 0 \\ k = 0 & 0.0 & 1 \\ 0 < k < e^{-1} & 0.1839 & 2 \\ k = e^{-1} & 0.3679 & 1 \\ k > e^{-1} & 1.3679 & 0 \end{bmatrix}$$
Done