iLabs

Shunya / Calculus Lab

Shunya · Maths lab

Calculus lab

Type any function and watch calculus happen. Squeeze x towards a point to see a limit, shrink a secant into a tangent to get the derivative, find where a curve peaks and dips, solve real optimisation problems, watch rectangles add up to an integral, and follow a differential equation through its slope field.

The maths behind it

What each mode covers

Limits — type any f(x) and squeeze x towards a from both sides: one-sided limits, infinite limits, oscillation, and whether f is continuous or differentiable there. Class 11 limits and class 12 continuity.
Derivative — a secant you can shrink into a tangent, the difference quotient table, the symbolic derivative, tangent and normal lines and the graph of f′. Class 11 derivatives and class 12 tangents and normals.
Maxima & minima — the curve coloured where it rises and falls, stationary points classified by the first and second derivative tests, points of inflection, concavity and absolute extrema on an interval. Class 12 applications of derivatives.
Optimisation — five classic problems (fenced rectangle, pen against a wall, open box, can of least metal, rectangle in a semicircle) with the four-step working. Class 12 applications of derivatives.
Integrals — Riemann sums with left, right, midpoint and trapezoid rules, the exact integral, the error, signed against total area, and the area function that shows the fundamental theorem. Class 12 integrals.
Differential equations — slope fields, a draggable starting point, Runge–Kutta and Euler solutions and the exact solution for the standard first-order equations. Class 12 differential equations.

Part of Shunya. See the syllabus map for the chapters these modes map to. The Function & Graph Explorer is a good place to look at a function before you differentiate it. Numbers here are computed live from your function, so a few results are numerical estimates and are shown to four decimals.

Formulas used in this lab

Limits Class 11

Definition
lim⁡x→af(x)=L\lim_{x \to a} f(x) = L
The limit exists when
lim⁡x→a−f(x)=lim⁡x→a+f(x)\lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x)
Algebra of limits
lim⁡(f±g)=lim⁡f±lim⁡g,lim⁡(fg)=lim⁡f⋅lim⁡g\lim (f \pm g) = \lim f \pm \lim g,\qquad \lim (fg) = \lim f \cdot \lim g
Standard limits
lim⁡x→0sin⁡xx=1,lim⁡x→0ex−1x=1\lim_{x \to 0}\dfrac{\sin x}{x} = 1,\qquad \lim_{x \to 0}\dfrac{e^x - 1}{x} = 1
More standard limits
lim⁡x→0ln⁡(1+x)x=1,lim⁡x→axn−anx−a=nan−1\lim_{x \to 0}\dfrac{\ln(1 + x)}{x} = 1,\qquad \lim_{x \to a}\dfrac{x^n - a^n}{x - a} = na^{n-1}
The number e
lim⁡n→∞(1+1n)n=e\lim_{n \to \infty}\left(1 + \dfrac{1}{n}\right)^n = e

Derivative Class 11

First principles
f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0}\dfrac{f(x + h) - f(x)}{h}
Sum and product
(u±v)′=u′±v′,(uv)′=u′v+uv′(u \pm v)' = u' \pm v',\qquad (uv)' = u'v + uv'
Quotient
(uv)′=u′v−uv′v2\left(\dfrac{u}{v}\right)' = \dfrac{u'v - uv'}{v^2}
Chain rule
ddxf(g(x))=f′(g(x)) g′(x)\dfrac{d}{dx}f(g(x)) = f'(g(x))\,g'(x)
Power and exponential
(xn)′=nxn−1,(ex)′=ex,(ln⁡x)′=1x(x^n)' = nx^{n-1},\qquad (e^x)' = e^x,\qquad (\ln x)' = \dfrac{1}{x}
Trigonometric
(sin⁡x)′=cos⁡x,(cos⁡x)′=−sin⁡x,(tan⁡x)′=sec⁡2x(\sin x)' = \cos x,\quad (\cos x)' = -\sin x,\quad (\tan x)' = \sec^2 x

Continuity and differentiability Class 12

Continuous at a
lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a)
Differentiable at a
lim⁡h→0−f(a+h)−f(a)h=lim⁡h→0+f(a+h)−f(a)h\lim_{h \to 0^-}\dfrac{f(a + h) - f(a)}{h} = \lim_{h \to 0^+}\dfrac{f(a + h) - f(a)}{h}
Differentiable implies continuous
f′(a) exists⇒f is continuous at af'(a) \text{ exists} \Rightarrow f \text{ is continuous at } a
The reverse is false (|x| is continuous at 0 but not differentiable)
f(x)=∣x∣f(x) = |x|

Tangent and normal Class 12

Slope of the tangent
m=f′(x0)m = f'(x_0)
Tangent line
y−y0=f′(x0) (x−x0)y - y_0 = f'(x_0)\,(x - x_0)
Normal line
y−y0=−1f′(x0) (x−x0)y - y_0 = -\dfrac{1}{f'(x_0)}\,(x - x_0)
Rate of change of y with respect to x
dydx\dfrac{dy}{dx}

Increasing, decreasing, maxima and minima Class 12

Increasing and decreasing
f′(x)>0⇒increasing,f′(x)<0⇒decreasingf'(x) > 0 \Rightarrow \text{increasing},\qquad f'(x) < 0 \Rightarrow \text{decreasing}
Stationary points
f′(x)=0f'(x) = 0
First derivative test
f′ changes +→−⇒max⁡,−→+⇒min⁡f' \text{ changes } + \to - \Rightarrow \max,\qquad - \to + \Rightarrow \min
Second derivative test
f′(c)=0, f′′(c)<0⇒max⁡;f′′(c)>0⇒min⁡f'(c) = 0,\ f''(c) < 0 \Rightarrow \max;\quad f''(c) > 0 \Rightarrow \min
Concavity and inflection
f′′>0: concave up,f′′<0: concave downf'' > 0:\ \text{concave up},\quad f'' < 0:\ \text{concave down}
Absolute extrema on [a, b]: compare the ends and every stationary point c
f(a), f(b), f(c)f(a),\ f(b),\ f(c)

Optimisation Class 12

Fixed perimeter P
A(x)=x(P2−x),x=P4A(x) = x\left(\dfrac{P}{2} - x\right),\qquad x = \dfrac{P}{4}
Pen against a wall, fencing L
A(x)=x(L−2x),x=L4A(x) = x(L - 2x),\qquad x = \dfrac{L}{4}
Open box from a square sheet s
V(x)=x(s−2x)2,x=s6V(x) = x(s - 2x)^2,\qquad x = \dfrac{s}{6}
Can of volume V, least metal
S(r)=2πr2+2Vr,r=V2π3, h=2rS(r) = 2\pi r^2 + \dfrac{2V}{r},\qquad r = \sqrt[3]{\dfrac{V}{2\pi}},\ h = 2r
Rectangle in a semicircle of radius R
A(x)=2xR2−x2,x=R2A(x) = 2x\sqrt{R^2 - x^2},\qquad x = \dfrac{R}{\sqrt{2}}
The four steps
write f(x); f′(x)=0; check f′′(x); state the answer\text{write } f(x);\ f'(x) = 0;\ \text{check } f''(x);\ \text{state the answer}

Integrals Class 12

Riemann sum
∑i=1nf(xi) Δx,Δx=b−an\sum_{i=1}^{n} f(x_i)\,\Delta x,\qquad \Delta x = \dfrac{b - a}{n}
Definite integral
∫abf(x) dx=lim⁡n→∞∑i=1nf(xi) Δx\int_a^b f(x)\,dx = \lim_{n \to \infty}\sum_{i=1}^{n} f(x_i)\,\Delta x
Fundamental theorem
∫abf(x) dx=F(b)−F(a),F′(x)=f(x)\int_a^b f(x)\,dx = F(b) - F(a),\qquad F'(x) = f(x)
Standard integrals
∫xndx=xn+1n+1,∫exdx=ex,∫dxx=ln⁡x\int x^n dx = \dfrac{x^{n+1}}{n + 1},\quad \int e^x dx = e^x,\quad \int \dfrac{dx}{x} = \ln x
Trigonometric
∫sin⁡x dx=−cos⁡x,∫cos⁡x dx=sin⁡x\int \sin x\,dx = -\cos x,\qquad \int \cos x\,dx = \sin x
Properties
∫abf=−∫baf,∫abf=∫acf+∫cbf\int_a^b f = -\int_b^a f,\qquad \int_a^b f = \int_a^c f + \int_c^b f
Trapezoid rule
Δx2 [f(x0)+2f(x1)+⋯+f(xn)]\dfrac{\Delta x}{2}\,\bigl[f(x_0) + 2f(x_1) + \dots + f(x_n)\bigr]

Differential equations Class 12

Order and degree
order=highest derivative,degree=its power\text{order} = \text{highest derivative},\qquad \text{degree} = \text{its power}
Variable separable
dydx=f(x)g(y)⇒∫dyg(y)=∫f(x) dx\dfrac{dy}{dx} = f(x)g(y) \Rightarrow \int \dfrac{dy}{g(y)} = \int f(x)\,dx
Growth and decay
dydx=ky⇒y=Cekx\dfrac{dy}{dx} = ky \Rightarrow y = Ce^{kx}
Linear first order
dydx+Py=Q,integrating factor e∫P dx\dfrac{dy}{dx} + Py = Q,\qquad \text{integrating factor } e^{\int P\,dx}
Euler's method
yn+1=yn+h f(xn,yn)y_{n+1} = y_n + h\,f(x_n, y_n)
Particular solution
use y(x0)=y0 to find the constant C\text{use } y(x_0) = y_0 \text{ to find the constant } C

Integration by substitution and by parts Class 12

Substitution
∫f(g(x)) g′(x) dx=∫f(u) du,u=g(x)\int f(g(x))\,g'(x)\,dx = \int f(u)\,du,\quad u = g(x)
Definite integral, new limits
∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(u) du\int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du
The form f′ ÷ f
∫f′(x)f(x) dx=ln⁡∣f(x)∣+C\int \dfrac{f'(x)}{f(x)}\,dx = \ln|f(x)| + C
Powers of a function
∫[f(x)]nf′(x) dx=[f(x)]n+1n+1+C (n≠−1)\int [f(x)]^n f'(x)\,dx = \dfrac{[f(x)]^{n+1}}{n+1} + C\ (n \ne -1)
Integration by parts
∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du
LIATE (choice of u)
Logarithmic, Inverse trig, Algebraic, Trig, Exponential\text{Logarithmic, Inverse trig, Algebraic, Trig, Exponential}
The ex shortcut
∫ex [f(x)+f′(x)] dx=exf(x)+C\int e^x\,[f(x) + f'(x)]\,dx = e^x f(x) + C
Cyclic case
∫eaxsin⁡bx dx=eax(asin⁡bx−bcos⁡bx)a2+b2+C\int e^{ax}\sin bx\,dx = \dfrac{e^{ax}(a\sin bx - b\cos bx)}{a^2 + b^2} + C

Tangents, normals and implicit or parametric differentiation Class 12

Tangent and normal at (x₀, y₀)
y−y0=m(x−x0),y−y0=−1m(x−x0),m=dydx∣(x0,y0)y - y_0 = m(x - x_0),\qquad y - y_0 = -\dfrac{1}{m}(x - x_0),\quad m = \dfrac{dy}{dx}\Big|_{(x_0,y_0)}
Horizontal and vertical tangent
dydx=0 (horizontal),dydx→∞ (vertical)\dfrac{dy}{dx} = 0 \ (\text{horizontal}),\qquad \dfrac{dy}{dx} \to \infty \ (\text{vertical})
Subtangent and subnormal
∣y0m∣,∣y0m∣\left|\dfrac{y_0}{m}\right|,\qquad |y_0 m|
Length of tangent and normal
∣y01+m2m∣,∣y01+m2∣\left|\dfrac{y_0\sqrt{1+m^2}}{m}\right|,\qquad \left|y_0\sqrt{1+m^2}\right|
Implicit differentiation
F(x,y)=0⇒dydx=−FxFyF(x,y) = 0 \Rightarrow \dfrac{dy}{dx} = -\dfrac{F_x}{F_y}
Parametric differentiation
dydx=dy/dtdx/dt,d2ydx2=y′′x′−y′x′′(x′)3\dfrac{dy}{dx} = \dfrac{dy/dt}{dx/dt},\qquad \dfrac{d^2y}{dx^2} = \dfrac{y''x' - y'x''}{(x')^3}
Angle between two curves
tan⁡θ=∣m1−m21+m1m2∣\tan\theta = \left|\dfrac{m_1 - m_2}{1 + m_1 m_2}\right|