OnlyMath / Formula guides

Math formulas in context.

Check the conditions, understand the reasoning, and work through an example. Then try a variation, with checks, common pitfalls, and answers when you need them.

01 / Geometry

Pythagorean theorem

Find a missing side in a right triangle, or turn perpendicular horizontal and vertical distances into a straight-line distance.

a2+b2=c2a^2+b^2=c^2

Check the conditions first

  • The triangle must have a right angle. The two sides meeting at that angle are the legs a and b.
  • c is the hypotenuse, opposite the right angle and longer than either leg. Use positive side lengths in the same unit.
  • To test whether a triangle is right-angled, put its longest side in the c position. The converse says that equality guarantees a right angle.

Why it works

  1. Arrange four identical right triangles inside a square of side a + b, with their hypotenuses surrounding a central square of side c. The acute angles of each triangle add to 90°, so the central corners are right angles.

  2. Count the same area as the four triangles plus the central square.

    (a+b)2=4(ab2)+c2(a+b)^2=4\left(\frac{ab}{2}\right)+c^2
  3. Expand both sides and cancel the matching 2ab terms.

    a2+2ab+b2=2ab+c2a^2+2ab+b^2=2ab+c^2

Worked example, step by step

A right triangle has legs 3 cm and 4 cm. Find its hypotenuse.

  1. Label the unknown hypotenuse c. Both given lengths are legs, so add their squares.

    c2=32+42c^2=3^2+4^2
  2. Square each number before adding.

    c2=9+16=25c^2=9+16=25
  3. Take the positive square root because c is a length. The hypotenuse is 5 cm.

    c=25=5c=\sqrt{25}=5

Check your result

Substitute the result into the original relation. Also check that 5 is greater than both 3 and 4, and less than their sum 7.

32+42=25=523^2+4^2=25=5^2

Avoid these pitfalls

  • Do not use a + b = c: the theorem relates squares of lengths, not the lengths themselves.
  • If a leg is missing, subtract its companion’s square from c² before taking the square root.
  • A picture that looks right-angled is not enough. Use a given right angle, perpendicular directions, or a justified converse test.

Try it: original variation exercises

Attempt each problem before opening the answer. Compare the reasoning as well as the result.

  1. A 17 m support cable stretches from level ground to a vertical mast. Its ground anchor is 8 m from the mast. How high is the attachment point?

    Answer and reasoning for exercise 1

    The cable is the hypotenuse. Subtract to find the vertical leg; the attachment point is 15 m high.

    h=172−82=225=15h=\sqrt{17^2-8^2}=\sqrt{225}=15
  2. A rectangular panel is 5 units wide and 7 units tall. Find its diagonal exactly, then to two decimal places.

    Answer and reasoning for exercise 2

    The width and height meet at a right angle. Keep the radical until the final rounding step.

    d=52+72=74≈8.60d=\sqrt{5^2+7^2}=\sqrt{74}\approx 8.60
  3. A triangle has sides 6, 8, and 11 units. Is it a right triangle? Explain rather than relying on a sketch.

    Answer and reasoning for exercise 3

    No. Test the longest side, 11, as the possible hypotenuse. The squares do not satisfy the theorem.

    62+82=100≠121=1126^2+8^2=100\ne121=11^2
02 / Algebra

Quadratic formula

Solve a quadratic equation even when its factors are hard to spot. The discriminant also tells you how many real solutions to expect.

x=−b±b2−4ac2ax=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

Check the conditions first

  • First write ax² + bx + c = 0, with real coefficients and a ≠ 0. If a = 0, the equation is not quadratic.
  • Let D = b² − 4ac. If D > 0 there are two distinct real roots; if D = 0 there is one repeated real root.
  • If D < 0, there are no real roots. Complex numbers extend the formula to that case, but these examples work over the real numbers.

Why it works

  1. Start from ax² + bx + c = 0. Multiply by 4a and move the constant term to the right.

    4a2x2+4abx=−4ac4a^2x^2+4abx=-4ac
  2. Add b² to both sides to complete the square.

    (2ax+b)2=b2−4ac(2ax+b)^2=b^2-4ac
  3. When D ≥ 0, take both square-root branches, subtract b, and divide by 2a. This produces the formula above, including when a is negative.

    2ax+b=±D2ax+b=\pm\sqrt{D}

Worked example, step by step

Solve x² − 5x + 6 = 0 and check both answers.

  1. Read the signed coefficients from the standard form.

    a=1,b=−5,c=6a=1,\quad b=-5,\quad c=6
  2. Compute the discriminant. It is positive, so expect two distinct real roots.

    D=(−5)2−4(1)(6)=25−24=1D=(-5)^2-4(1)(6)=25-24=1
  3. Substitute into the formula, keeping the entire numerator over 2a.

    x=5±12=5±12x=\frac{5\pm\sqrt{1}}{2}=\frac{5\pm1}{2}
  4. Evaluate the plus and minus cases separately.

    x1=3,x2=2x_1=3,\qquad x_2=2

Check your result

Both values make the original expression zero. Their sum is 5 = −b/a and their product is 6 = c/a, giving another useful check.

32−5(3)+6=022−5(2)+6=0\begin{aligned}3^2-5(3)+6&=0\\2^2-5(2)+6&=0\end{aligned}

Avoid these pitfalls

  • Read b with its sign: when b = −5, the numerator begins with −b = 5. Also, (−5)² = 25.
  • Do not forget the minus branch or divide only the square-root term by 2a.
  • A negative discriminant means no real solution; it does not mean the roots are negative. A zero discriminant gives the same root twice.

Try it: original variation exercises

Attempt each problem before opening the answer. Compare the reasoning as well as the result.

  1. Solve this non-monic quadratic. Keep the negative root as a fraction.

    2x2−3x−2=02x^2-3x-2=0
    Answer and reasoning for exercise 1

    The discriminant is 25. The denominator is 4, so the roots are 2 and −1/2.

    x=3±254=2or−12x=\frac{3\pm\sqrt{25}}{4}=2\quad\text{or}\quad-\frac12
  2. How many distinct real roots does this equation have? Find them.

    x2+6x+9=0x^2+6x+9=0
    Answer and reasoning for exercise 2

    D = 36 − 36 = 0, so there is one distinct real root, −3, with multiplicity two. Factoring gives the same result.

    (x+3)2=0⟹x=−3(x+3)^2=0\quad\Longrightarrow\quad x=-3
  3. Decide whether this equation has real roots. Explain with both the discriminant and a completed square.

    x2+2x+5=0x^2+2x+5=0
    Answer and reasoning for exercise 3

    D = 4 − 20 = −16, so there are no real roots. The completed square is always positive for real x, confirming this.

    x2+2x+5=(x+1)2+4>0x^2+2x+5=(x+1)^2+4>0
03 / Calculus

Derivative power rule

Find the instantaneous rate of change of a power function. For polynomials, combine it with the sum and constant-multiple rules to differentiate one term at a time.

ddxxn=nxn−1\frac{d}{dx}x^n=nx^{n-1}

Check the conditions first

  • For positive integer n, the rule holds at every real x. Constant functions have derivative 0; treat f(x) = 1 directly rather than writing 0 · x⁻¹ at x = 0.
  • For a negative integer exponent, exclude x = 0. For any real exponent n, the rule is valid on x > 0.
  • Some rational powers also allow negative inputs; check the particular function’s real domain. Behavior at x = 0 needs separate attention: √x is defined there but has no finite derivative there.

Why it works

  1. For f(x) = x³, begin with the difference quotient, using h ≠ 0.

    (x+h)3−x3h=3x2+3xh+h2\frac{(x+h)^3-x^3}{h}=3x^2+3xh+h^2
  2. Let h approach zero. The terms containing h vanish, leaving 3x². The binomial expansion gives the same pattern for all positive integer powers.

    f′(x)=lim⁡h→0(3x2+3xh+h2)=3x2f'(x)=\lim_{h\to0}(3x^2+3xh+h^2)=3x^2
  3. For an arbitrary real n and x > 0, write xⁿ as e to the power n ln x. Once the chain rule and the derivatives of exp and ln are known, they justify the same result.

    ddxenln⁡x=enln⁡xnx=nxn−1\frac{d}{dx}e^{n\ln x}=e^{n\ln x}\frac{n}{x}=nx^{n-1}

Worked example, step by step

For f(x) = x³, find the slope and tangent line at x = 2.

  1. Multiply by the exponent, then lower that exponent by one.

    f′(x)=3x3−1=3x2f'(x)=3x^{3-1}=3x^2
  2. Evaluate the derivative at x = 2 to obtain the slope.

    f′(2)=3(22)=12f'(2)=3(2^2)=12
  3. Evaluate the original function to locate the point of tangency.

    f(2)=8⟹(2,8)f(2)=8\quad\Longrightarrow\quad (2,8)
  4. Use point-slope form. This line matches the function’s value and slope at the point.

    y−8=12(x−2)⟹y=12x−16y-8=12(x-2)\quad\Longrightarrow\quad y=12x-16

Check your result

The tangent line gives y = 8 at x = 2. A nearby secant slope is 12.0601 when h = 0.01, approaching 12 as h approaches zero. A numerical check supports the calculation but is not a proof.

(2+h)3−8h=12+6h+h2\frac{(2+h)^3-8}{h}=12+6h+h^2

Avoid these pitfalls

  • Subtract one from the exponent, not from the whole term: the derivative of x³ is 3x², not 3x³ − 1.
  • A composite expression needs the chain rule. For (2x + 1)³, multiply 3(2x + 1)² by the inner derivative 2.
  • The rule is for a constant exponent. It does not directly differentiate aˣ or xˣ. Also distinguish f(2), a function value, from f′(2), a slope.

Try it: original variation exercises

Attempt each problem before opening the answer. Compare the reasoning as well as the result.

  1. Differentiate this polynomial, then find its slope at x = −1.

    g(x)=2x4−3x2+5g(x)=2x^4-3x^2+5
    Answer and reasoning for exercise 1

    Apply the constant-multiple rule term by term. The derivative of 5 is zero; then substitute −1.

    g′(x)=8x3−6x,g′(−1)=−2g'(x)=8x^3-6x,\qquad g'(-1)=-2
  2. Rewrite the reciprocal as a power, differentiate, and state the domain of the function and its derivative.

    p(x)=1x2p(x)=\frac{1}{x^2}
    Answer and reasoning for exercise 2

    Use exponent −2. Both the function and its derivative are defined for every real x except 0.

    p(x)=x−2,p′(x)=−2x−3=−2x3p(x)=x^{-2},\qquad p'(x)=-2x^{-3}=-\frac{2}{x^3}
  3. Find the derivative of √x at x = 9. Is the same derivative formula valid at x = 0?

    Answer and reasoning for exercise 3

    For positive x, use exponent 1/2. The derivative at 9 is 1/6.

    ddxx=12x(x>0)\frac{d}{dx}\sqrt{x}=\frac{1}{2\sqrt{x}}\quad(x>0)

    No finite derivative exists at 0: even the right-hand difference quotient grows without bound. A function can be defined at a point without having a finite derivative there.

    h−0h=1h→+∞(h→0+)\frac{\sqrt{h}-0}{h}=\frac{1}{\sqrt{h}}\to+\infty\quad(h\to0^+)