aroc (Function)

Command last updated 4/7/2022.

aroc(f, x, a, b)

Returns the average rate of change of f between x=a and x=b.

Example

Find the average rate of change of \(h(t) = -60 \cos \left( \dfrac{\pi t}{15} \right) + 75\), between \(t=0\) and \(t=\dfrac{30}{4}\). (2023 Methods Exam 2 Section B Question 2c)

aroc(h(t), t, 0, 30/4)

Contributed by Nhan

avalue (Function)

Command last updated 4/7/2022.

avalue(f, x, a, b)

Returns the average value of f between x=a and x=b.

Example

Find the average value of \(h(t) = -60 \cos \left( \dfrac{\pi t}{15} \right) + 75\), between \(t=0\) and \(t=\dfrac{30}{4}\). (2023 Methods Exam 2 Section B Question 2b)

avalue(h(t), t, 0, 30/4)

Contributed by Nhan

axisints (Program)

Command last updated 9/7/2022.

IMPORTANT - requires printpts stored in the same folder as your current folder or in the “library” folder (see the Variable Manager).

axisints(f, l, u)

Returns a list of coordinates of x-axis and y-axis intercepts on f in the domain xϵ[l, u].

Example

Find the axis intercepts of \(y = x(x - 2)(x + 1)\). (2023 Methods Exam 2 Section B Question 1a)

axisints(x(x-2)(x+1), -∞, ∞)

Contributed by Nhan

biCDf (Function)

Command last updated 4/7/2022.

biCDf(l, u, n, p)

l and u should evaluate to numbers, not expressions in terms of unknown variables. Prefer to use discrete if it would be more appropriate.

Equivalent to the builtin binomialCDf(l, u, n, p), but returns exact values in Standard mode whereas binomialCDf can return only decimal answers.

Returns the probability of between and including l and u successes from n trials with p probability of success each trial.

Example

Let \(X \sim \mathrm{Bi}(7, p)\). Find \(\mathrm{Pr}(2 \leq X \leq 3)\) as a polynomial in terms of \(p\). (2017 Methods Exam 2 Section B Question 3f)

biCDf(2, 3, 7, p)

Contributed by Nhan

biPDf (Function)

Command last updated 4/7/2022.

biPDf(x, n, p)

Equivalent to the builtin binomialPDf(x, n, p), but returns exact values in Standard mode whereas binomialPDf can return only decimal answers.

Returns the probability of x successes from n trials with p probability of success each trial.

Example

A box contains \(n\) green balls and \(m\) red balls. A ball is selected at random, then replaced in the box. Find the probability that in 8 such selections a green ball is selected at least once. (2023 Methods Exam 2 Section A Question 8)

1 - biPDf(0, 8, n(n+m))

Contributed by Nhan

bmeth (Program)

Command last updated 7/2/2023.

bmeth(f, xl, xh, n)

Applies the bisection method for n iterations. Prints the details of each iteration and returns the coordinates following the n-th iteration.

Example

Find the \(x\)-value for a root of \(\sin(x)\) estimated by the bisection method, with an initial range of \([3, 5]\), after 2 iterations.

bmeth(sin(x), 3, 5, 2)

Contributed by Nhan

discrete (Function)

Command last updated 4/7/2022.

Note - this program does not work in all cases, such as biCDf (use the builtin binomialCDf instead). Answers should be tested by the user.

discrete(”f ”, x, l, u, h)

Returns a matrix with x-values in the left column and f-values at the corresponding x-values in the right column, for discrete values of x with step size h in the domain [l,u].

Example

\(X \sim \mathrm{Bi}(n, 0.1)\). Find the least \(n\) such that \(\mathrm{Pr}(X \geq 2) \geq 0.5\). (2021 Methods Exam 2 Section A Question 17)

discrete("binomialCDf(2, n, n, 0.1)", n, 15, 19, 1)

Contributed by Nhan

hCDf (Function)

Command last updated 4/7/2022.

hCDf(l, u, n, M, N)

Parameters should evaluate to numbers, not expressions in terms of unknown variables.

Equivalent to the builtin hypergeoCDf(l, u, n, M, N), but returns exact values in Standard mode whereas hypergeoCDf can return only decimal answers.

Returns the probability of between and including l and u successes from n draws, without replacement between draws, from a population size N that contains M successes.

The hypergeometric distribution is not on the VCE Mathematical Methods Study Design, but can be useful for certain examination questions. See the Example. Students are expected to, and should be able to, answer these questions using alternative Mathematical Methods. This function should be used only for checking, and only with an understanding of the circumstances in which the hypergeometric distribution applies.

Example

A bag contains 5 blue marbles and 4 red marbles. 4 balls are taken from the bag, without replacement between draws. Find the probability that the proportion of blue marbles in the 4 draws is greater than half. (2017 NHT Methods Exam 2 Section A Question 11)

hCDf(3, 4, 4, 5, 5+4)

Contributed by Nhan

hPDf (Function)

Command last updated 4/7/2022.

hPDf(x, n, M, N)

Equivalent to the builtin hypergeoPDf(x, n, M, N), but returns exact values in Standard mode whereas hypergeoPDf can return only decimal answers.

Returns the probability of x successes from n draws, without replacement between draws, from a population size N that contains M successes.

The hypergeometric distribution is not on the VCE Mathematical Methods Study Design, but can be useful for certain examination questions. See the Example. Students are expected to, and should be able to, answer these questions using alternative Mathematical Methods. This function should be used only for checking, and only with an understanding of the circumstances in which the hypergeometric distribution applies.

Example

A box contains n marbles, of which k marbles are coloured red and the remainder n-k marbles are coloured green. 2 marbles are drawn from the box, without replacement between draws. Find the probability that the 2 marbles drawn are the same colour. (2019 Methods Exam 2 Section A Question 17)

hPDf(0, 2, k, n)+hPDf(2, 2, k, n)

Contributed by Nhan

infpts (Program)

Command last updated 23/11/2022.

IMPORTANT - requires printpts stored in the same folder as your current folder or in the “library” folder (see the Variable Manager).

infpts(f, l, u)

Returns a list of coordinates of points on f in the domain xϵ[l, u] where the second derivative equals 0.

Each point must be verified to determine whether it is really a point of inflection.

Example

Find the coordinates of any points of inflection of the graph of \(\dfrac{x}{1+x^{3}}\). (2017 Specialist Exam 2 Section B Question 1aiii)

Each point must be verified to determine whether it is really a point of inflection.

infpts(x/(1+x^3), -∞, ∞)

Contributed by Nhan

intpts (Program)

Command last updated 9/7/2022.

IMPORTANT - requires printpts stored in the same folder as your current folder or in the “library” folder (see the Variable Manager).

intpts(f, g, l, u)

Returns a list of coordinates of points of intersection of f and g.

Example

Find the coordinates of the points of intersection of the graphs of \((x-1)^3 (x+2)^3\) and \((x-1)^2 (x+2)^3\). (2019 NHT Methods Exam 2 Section B Question 1a)

intpts((x-1)^3 (x+2)^3, (x-1)^2 (x+2)^3, -∞, ∞)

Contributed by Nhan

keypts (Program)

Command last updated 9/7/2022.

IMPORTANT - requires printpts stored in the same folder as your current folder or in the “library” folder (see the Variable Manager).

keypts(f, l, u)

Prints and categorises coordinates of key points on y=f in the domain xϵ[l, u].

The 2nd and 3rd derivative tests are not on the VCE Mathematical Methods Study Design.

Example

Find key points on \(y = \dfrac{1}{5} x^5 + \dfrac{3}{4} x^4 - 2x^2 + \dfrac{12}{5}\) for \(x \in (-\infty, 2]\).

keypts(1/5 x^5 + 3/4 x^4 - 2x^2 + 12/5, -∞, 2)

Contributed by Nhan

lineof (Function)

Command last updated 4/7/2022.

lineof(a, b, c, d, x)

Returns an expression for the line connecting points (a, b) and (c, d) in terms of x.

Example

Let \(f(x) = x^3 - 5x\). Find the equation of the line through \((-1, f(-1))\) and \((1, f(1))\). (2017 Methods Exam 2 Section B Question 1bi)

lineof(-1, f(-1), 1, f(1), x)

Contributed by Nhan

mu (Function)

Command last updated 4/7/2022.

mu(f, x, a, b)

For fastest calculation time, the domain [a, b] should be as small as possible.

If f is a piecewise function it should be entered raw not as a user-defined function.

The integral of f over the domain [a, b] must equal 1, as this is assumed by the mu function.

Returns the mean of the continuous probability distribution defined by the probability density function f over the domain [a, b].

Example

Find the expected value of \(v\) for the probability density function

[f(v) = \left{ \begin{array}{ll} \dfrac{1}{6 \pi} \sin \left( \sqrt{ \dfrac{v-30}{3} } \right) & 30 \leq v \leq 3 \pi^2 + 30
\ 0 & \mathrm{elsewhere} \end{array} \right.]

(2023 Methods Exam 2 Section B Question 4i)

mu(3/50 (t/50)^2 e^(-(t/50)^3), t, 0, ∞)

Contributed by Nhan

nPDf (Function)

Command last updated 4/7/2022.

nPDf(x, σ, μ)

Equivalent to the builtin normPDf(x, σ, μ), but more convenient to obtain the specific probability density function and to graph the function.

Returns the value of the normal distribution function with a standard deviation of σ and a mean of μ at the value x.

Example

Let \(M \sim \mathrm{N}(68, 8^2)\). Find \(\mathrm{Pr}(60<M<90)\). (2018 Methods Exam 2 Section B Question 4a)

graph of nPDf(x, 8, 68)

Contributed by Nhan

nmeth (Program)

Command last updated 7/2/2023.

nmeth(f, xa, n)

Applies Newton’s method to approximate an x-intercept of f for n iterations. Prints the details of each iteration and returns the coordinates following the n-th iteration. Column i is the iteration number, x is \(x_i\), y is \(f(x_i)\), dy/dx is \(f'(x_i)\) and δx is \(x_{i+1} - x_i = - \dfrac{f(x_i)}{f'(x_i)}\).

Example

Find \(x_1\), \(x_2\) and \(x_3\) using Newton’s method with \(x_0 = 0\) to approximate an x-intercept of \(h(x) = 2^x - x^2\). (2023 Methods Exam 2 Section B Question 3f)

nmeth(2^x-x^2, 0, 3)

Contributed by Nhan

pcheck (Program)

Command last updated 6/3/2024.

Note - this program may throw an error if in Decimal mode. Use Standard mode instead.

Define f(x) = {a, b, c, d, e}

pcheck(f(x), l, r)

Returns a matrix with each row corresponding to an option of f(x), with the columns containing for that option, from left to right, f(x), l, r, judge(l=r).

Example

\(f(x+f(x)) = f(2x)\). Which option could possibly be \(f(x)\)? (2018 Methods Exam 2 Section A Question 10)

Define f(x)={1-x,x-1,x,x/2,(1-x)/2}

pcheck(f(x),f(x+f(x)),f(2x))

Contributed by Nhan and Kevin

printpts (Program)

Command last updated 9/7/2022.

printpts(f, {s})

Returns a list of coordinates of points on f corresponding to the x-values in s.

Example

Find the \(y\)-values of the points where \(x = - \infty, -1, 0, 1, \infty\) on \(y = (x-1)^2 (x+2)^3\).

printpts((x-1)^2 (x+2)^3, {-∞, -1, 0, 1, ∞})

Contributed by Nhan

sd (Function)

Command last updated 4/7/2022.

sd(f, x, a, b)

For fastest calculation time, the domain [a, b] should be as small as possible.

If f is a piecewise function it should be entered raw not as a user-defined function.

The integral of f over the domain [a, b] must equal 1, as this is assumed by the sd function.

Returns the standard deviation of the continuous probability distribution defined by the probability density function f over the domain [a, b].

Example

Find the standard devation of \(x\) for the probability density function

[\left{ \begin{array}{ll} \dfrac{x}{500} & 0 \leq x < 20
\dfrac{50-x}{750} & 20 \leq x \leq 50
\ 0 & \text{elsewhere} \end{array} \right.]

(2021 Methods Exam 2 Section B Question 4g)

sd(function, x, 0, 50)

Contributed by Nhan

simlin (Function)

Command last updated 4/7/2022.

simlin(a, b, c, d, e, f, g)

Returns a list.

Example

Find the largest set of values of \(k\) for which the simultaneous linear equations \(kx+5y=k+5\) and \(4x+(k+1)y=0\) have ∞ solutions for \((x, y)\). (2023 Methods Exam 2 Section A Question 4)

simlin(k, 5, k+5, 4, k+1, 0, k)

Contributed by Nhan

statpts (Program)

Command last updated 9/7/2022.

IMPORTANT - requires printpts stored in the same folder as your current folder or in the “library” folder (see the Variable Manager).

statpts(f, l, u)

Returns a list of coordinates of stationary points on f in the domain xϵ[l, u].

Example

Find the coordinates of the stationary points of \(f(x) = x(x-2)(x+1)\). (2023 Methods Exam 2 Section B Question 1b)

statpts(x(x-2)(x+1), -∞), ∞)

Contributed by Nhan

trans (Function)

Command last updated 6/3/2024.

trans(e, t, x, y)

Returns the equation after the transformation is applied.

Example

\(f(x) = e^x + e^{-x}\) and \(g(x) = \dfrac{1}{2} f(2-x)\). Find a possible sequence of transformations that map \(f\) to \(g\). (2023 Methods Exam 2 Section B Question 5a)

trans(y=f(x), [[-1 0] [0 1/2]][[x] [y]] + [[2] [0]], x, y)

(1/2) f(2-x)

Contributed by Nhan

trsum (Function)

Command last updated 21/7/2022.

trsum(f, v, a, b, w)

Returns the approximation to \(\int_a^b f dv\) using trapeziums of width w and vertical parallel side lengths equal to the value of f at the trapezium’s left and right endpoints.

Example

Find the approximation of

[\int_0^{4} \left( \dfrac{1}{27} (x-3)^2 (x+3)^2 + 1 \right) dx]

using the trapezium rule with trapeziums of width \(1\). (Sample Methods Exam 2 Section A Question 3)

trsum((1/27)(x-3)^2(x+3)^2+1, x, 0, 4, 1)

Contributed by Nathan Chen

var (Function)

Command last updated 4/7/2022.

var(f, x, a, b)

For fastest calculation time, the domain [a, b] should be as small as possible.

If f is a piecewise function it should be entered raw not as a user-defined function.

The integral of f over the domain [a, b] must equal 1, as this is assumed by the var function.

Returns the variance of the continuous probability distribution defined by the probability density function f over the domain [a, b].

Example

Find the expected value of \(x\) for the probability density function

[\left{ \begin{array}{ll} 0.2e^{-0.2x} & x \geq 0
\ 0 & x < 0 \end{array} \right.]

(2021 NHT Methods Exam 2 Section A Question 14)

var(0.2e^(-0.2x), x, 0, ∞)

Contributed by Nhan