1. Foundations
Calculus studies change. Two central operations:
- Derivative: instantaneous rate of change, slope of tangent.
- Integral: accumulation, area under curve.
Limit definition: f'(a) = lim_{h->0} (f(a+h)-f(a))/h. Continuity is required for differentiability.
2. Derivatives
Core rules
| Rule | Form |
|---|---|
| Power | d/dx x^n = n x^{n-1} |
| Constant multiple | d/dx c f = c f' |
| Sum | (f+g)' = f' + g' |
| Product | (fg)' = f'g + fg' |
| Quotient | (f/g)' = (f'g - fg')/g^2 |
| Chain | d/dx f(g(x)) = f'(g(x)) g'(x) |
Trigonometric derivatives
d/dx sin x = cos x, d/dx cos x = -sin x, d/dx tan x = sec^2 x, d/dx sec x = sec x tan x, d/dx csc x = -csc x cot x, d/dx cot x = -csc^2 x
Interactive derivative visualizer
3. Applications of derivatives
- Tangent line:
y = f(a) + f'(a)(x-a) - Critical points where f' = 0 or undefined, test with first or second derivative
- Optimization: maximize area, minimize cost
- Related rates: differentiate both sides with respect to t
4. Integration
Antiderivatives
∫ f(x) dx = F(x) + C where F' = f.
| f(x) | ∫ f dx |
|---|---|
| x^n (n≠-1) | x^{n+1}/(n+1) |
| 1/x | ln|x| |
| e^x | e^x |
| sin x | -cos x |
| cos x | sin x |
| sec^2 x | tan x |
Fundamental Theorem
If F' = f continuous on [a,b], then ∫_a^b f(x) dx = F(b) - F(a). Differentiation and integration are inverses.
Interactive Riemann sum
5. Integration techniques
Substitution
∫ f(g(x)) g'(x) dx = ∫ f(u) du with u = g(x). Essential for composites.
Integration by parts
∫ u dv = uv - ∫ v du. Choose u to simplify when differentiated.
Trigonometric integrals
Use identities: sin^2 x = (1 - cos 2x)/2, cos^2 x = (1 + cos 2x)/2, 1 + tan^2 = sec^2.
Example: ∫ sin^2 x dx = x/2 - sin 2x/4 + C
Trigonometric substitution
√(a^2 - x^2) → x = a sinθ, √(a^2 + x^2) → x = a tanθ, √(x^2 - a^2) → x = a secθ
Partial fractions
Decompose rational function into sum of simpler fractions, then integrate termwise.
6. Applications of integration
- Area between curves: ∫ (top - bottom) dx
- Volume by disks: V = π ∫ [R(x)]^2 dx
- Arc length: L = ∫ sqrt(1 + (dy/dx)^2) dx
- Average value: (1/(b-a)) ∫_a^b f
7. Trigonometric problems
| Problem type | Method | Result |
|---|---|---|
| ∫ sin^m cos^n | odd power → save one, substitute | use u = cos or sin |
| ∫ tan^m sec^n | sec^2 = derivative of tan | reduce to polynomial in tan |
| ∫ dx/(a^2+x^2) | x = a tanθ | (1/a) arctan(x/a) |
| Derivative of arcsin | implicit differentiation | 1/√(1-x^2) |
Key identities to memorize: sin(A±B), cos(A±B), double-angle, Pythagorean.
8. GNU Octave lab
Octave with symbolic package handles calculus symbolically and numerically.
pkg load symbolic
syms x
f = x^3 - 3*x;
df = diff(f, x) % 3*x^2 - 3
intf = int(f, x) % x^4/4 - 3*x^2/2
% trigonometric
g = sin(x)^2;
dg = diff(g) % 2*sin(x)*cos(x)
ig = int(g, x) % x/2 - sin(2*x)/4
% definite integral
I = int(exp(-x^2), x, 0, 1);
vpa(I, 10) % numeric 0.7468241328
% numeric derivative check
fh = @(x) x.^3 - 3*x;
h = 1e-6; x0 = 1;
num_deriv = (fh(x0+h)-fh(x0-h))/(2*h) % ≈ 0
% plot function and tangent
xvals = linspace(-2,2,400);
y = fh(xvals);
plot(xvals,y); hold on;
a = 1; slope = 3*a^2 - 3;
tangent = fh(a) + slope*(xvals - a);
plot(xvals,tangent,'r--'); grid on; title('f and tangent at x=1');
% Riemann sum for sin x from 0 to pi
n = 20; a=0; b=pi;
dx = (b-a)/n; xs = a:dx:b-dx; % left
approx = sum(sin(xs))*dx
exact = 2
% integration by parts example ∫ x cos x dx
syms x
u = x; dv = cos(x);
int_parts = u*sin(x) - int(sin(x),x) % x*sin(x) + cos(x)
% trig substitution example ∫ dx/sqrt(1 - x^2)
int(1/sqrt(1 - x^2), x) % asin(x)
For numeric work without symbolic: use quad, integral, or finite differences.
9. Quick reference
Derivatives to know
d/dx e^x = e^x, d/dx ln x = 1/x, d/dx a^x = a^x ln a, d/dx arcsin x = 1/√(1-x²)
Integrals to know
∫ sec x tan x dx = sec x, ∫ csc x cot x dx = -csc x, ∫ dx/(x²+a²) = (1/a) arctan(x/a)
10. Practice set
- Find f' for f(x) = x^2 sin x using product and chain rules.
- Compute ∫_0^{π/2} sin^3 x cos x dx with substitution.
- Use Octave to verify d/dx tan x = sec^2 x symbolically.
- Find area between y = x^2 and y = x on [0,1].
- Evaluate ∫ e^x sin x dx using integration by parts twice.