Differential Equations, Probability and Numerical Methods
Discrete probability counting
Classical probability assigns to an event E the value P(E)=\dfrac{\text{number of favourable outcomes}}{\text{total number of equally likely outcomes}}, so the main skill is correct counting of the sample space. For two fair dice, the sample space is usually written as ordered pairs, giving 6\times 6=36 outcomes. Events such as a fixed sum or a fixed product are found by listing the ordered pairs that satisfy the condition, and both (a,b) and (b,a) must be counted when a\neq b.
Replacement changes the sample space. If an item is returned before the next draw, the draws are independent and there are n^2 equally likely ordered outcomes for n items. The event that the second value is greater than the first then corresponds to choosing two distinct values in increasing order, which is counted by \binom{n}{2}.
When outcomes are grouped into classes with a stated ratio, write the probability of one class as p, use the ratio to express the other class as a multiple of p, and impose that the total probability is 1. The probability is then shared equally among the faces in each class.
For a population that doubles after a fixed interval T_d, the count after k doublings is N_0 2^{k}, where k equals the elapsed time divided by T_d. A death event removes a cell from the base before the doublings that follow it, so the count must be corrected before the exponent is applied.
First-order linear ODE
A first-order linear ODE has the form \dfrac{dy}{dx}+P(x)y=Q(x). Its solution uses the integrating factor \mu(x)=e^{\int P(x)\,dx}, which turns the left side into \dfrac{d}{dx}(\mu y), so that y=\dfrac{1}{\mu}\left(\int \mu Q\,dx + C\right). Example: for y'+2y=4, \mu=e^{2x}, so y=2+Ce^{-2x}.
The constant C is fixed by the initial condition, and a candidate answer can be checked by substituting it into both the differential equation and the initial condition.
If the equation is separable, as in \dfrac{dy}{y+a}=\lambda\,dt, integrate both sides directly. The result y+a=Ce^{\lambda t} describes exponential growth or decay shifted by a constant. Two data points then give C and \lambda, and the growth rate \lambda is read from the exponent.
In bioreactor and tank problems, the rate of change of volume equals inflow minus outflow, which gives a first-order ODE. When an outflow rate depends on the time elapsed since an event such as a leak, set the clock to zero at that event and integrate from that starting time.
Newton-Raphson iteration
The Newton-Raphson method solves f(x)=0 by the update x_{n+1}=x_n-\dfrac{f(x_n)}{f'(x_n)}, which comes from replacing f by its tangent line at x_n. For example, for f(x)=x^2-5 with x_0=2, f(2)=-1 and f'(2)=4, so x_1=2.25.
Each iteration needs the value of f and the value of f' at the current point. For products such as x\ln x, use the product rule, which gives \ln x+1, and add the derivative of any extra term. For e^x, the derivative equals the function itself.
The method requires f'(x_n)\neq 0, and the result depends on the initial guess, which should be close to the root. Round only the final value to the number of decimal places requested, because early rounding can change the answer.
Trapezoidal rule integration
The composite trapezoidal rule approximates \int_a^b f(x)\,dx by T=\dfrac{h}{2}\left[f_0+2f_1+\cdots+2f_{n-1}+f_n\right], where h=(b-a)/n is the uniform step size. For example, with h=0.5 on [0,1] for f(x)=x, the rule gives \dfrac{0.5}{2}(0+2(0.5)+1)=0.75, which is exact because the rule integrates linear functions exactly.
For a convex function such as x^2 on an interval, the chord lies above the curve, so the trapezoidal estimate is larger than the exact integral. The absolute relative error is \left|\dfrac{T-I}{I}\right|\times 100\%, where I is the exact value.
When the derivative is given as a graph, the change in y over an interval equals the area under the curve of dy/dx, by the fundamental theorem of calculus. If the graph is a straight line, read two points, find the linear equation, and integrate it exactly.
Second-order linear ODE
For a constant-coefficient equation y''+my'+ny=0, substitute y=e^{rt} to obtain the characteristic equation r^2+mr+n=0. If the roots are r_1 and r_2, the general solution is C_1e^{r_1t}+C_2e^{r_2t}. The sum of the roots equals -m and the product of the roots equals n.
If a given function e^{rt} satisfies the equation for every choice of the constants C_1 and C_2, then both e^{r_1 t} and e^{r_2 t} must satisfy the equation separately. Substituting each exponential gives a pair of algebraic equations in m and n, which can be solved by adding and subtracting them.
For y''-y=0, substituting y=e^{Ax} gives (A^2-1)e^{Ax}=0. Since e^{Ax} is never zero for a finite x, the condition is A^2=1, so A=\pm 1. A value that makes the coefficient zero is a solution, while a constant such as 0 is not.
Sequential sampling probability
When items are drawn one after another without replacement, the probability of a specific sequence is the product of the conditional probabilities of each draw. At the first draw the chance of the required item is 1/n, at the second draw it is 1/(n-1), and so on.
If all n distinct items are drawn one at a time without replacement, each of the n! orders is equally likely, so a specific full order has probability 1/n!. For example, for three distinct items the probability of one particular order is 1/6.
What comes next
- Correlation coefficient
- ODE order and degree
- Exponential distribution probability
- Euler implicit method
- Variance of linear transformation
- Combinatorial counting of pairings
- Euler-Cauchy equation
- Arithmetic series sum
Sign in to read the full text free, up to 2 units a day.
Read this unit in the app