Posts

Understanding Hashing

Understanding Hashing: A Key Cryptographic Technique   What is Hashing?   Hashing is a cryptographic technique that takes an input of variable length and produces a fixed-length output, often represented in hexadecimal format. It is a one-way operation, meaning the original input cannot be easily derived from the output.  Why is Hashing Useful?   Hashing serves as a cornerstone of data security, particularly for:  Password protection: Hashing secures passwords, ensuring they remain unreadable even if a database is breached. Techniques like salting (adding random data to hashes) further enhance security by thwarting attacks like rainbow table attacks.  Blockchain security: Hashing is integral to blockchain technology, such as Bitcoin, where SHA-256 ensures the integrity and security of transactions and blocks.  Characteristics of Hashing  Irreversibility : Hash functions should be computationally infeasible to reverse. For example, given the hash b...

Solving Quadratic Equations

Solving Quadratic Equations Solving Quadratic Equations "We do not learn mathematics, we just get used to it" - Amankwah Rawley A Quadratic Equation is a polynomial equation of the form \(ax^2 + bx + c = 0\) (A polynomial of order 2). There are several ways to solve quadratic equations. This article will elaborate on three methods. They are: Factorization Completing of Squares Quadratic Formula 1. Factorization Given a quadratic equation \(ax^2 + bx + c = 0\). The factorization method says Find the factors of c (including negative values). Find two factors of c such that they multiply to give c and sum to give b. Substitute the two factors for b Group the terms in Twos Then Factorize 1.1. Example Consider the following quadratic equation: \(x^2 + 5x + 6 = 0\) Firstly we recognize that \(a=1, b=5, c=6\) Using the Factorization method Find the factors of the c=6 (Factors simply means integers which can divide c exactly with...

Proof of Quotient Rule in Differentiation

 Proof of Quotient Rule: Let  \[y(x) = \dfrac{u(x)}{v(x)} \] Taking the natural Logarithm \[\ln y(x) = \ln \dfrac{u(x)}{v(x)}\] \[\ln y(x) = \ln u(x) - \ln v(x) \] Taking the Differential  \[ \dfrac{y'(x)}{y(x)} = \dfrac{u'(x)}{u(x)} - \dfrac{v'(x)}{v(x)} \] Multiplying by y(x) \[ y'(x) = y(x) (\dfrac{u'(x)}{u(x)} - \dfrac{v'(x)}{v(x)}) \] But \( y(x) = \dfrac{u(x)}{v(x)} \) \[ y'(x) = \dfrac{u(x)}{v(x)}\dfrac{u'(x)}{u(x)} -  \dfrac{u(x)}{v(x)}\dfrac{v'(x)}{v(x)}) \] \[ y'(x) = \dfrac{u'(x)}{v(x)} - \dfrac{u(x)v'(x)}{v(x)^2} \] \[ y'(x) = \dfrac{u'(x)v(x) - u'(x)v'(x)}{v(x)^2} \]

Proof of the Product Rule in Differentiation

 Product Rule Proof: let  \[y(x) = u(x) \cdot v(x) \] Taking the natural log on both sides \[ \ln y(x) = \ln (u(x)\cdot v(x)) \] \[ \ln y(x) = \ln u(x) + \ln v(x) \] Taking the Differential \[\dfrac{1}{y(x)} y'(x) = \dfrac{1}{u(x)} u'(x) + \dfrac{1}{v(x)} v'(x) \] \[ y'(x) = y(x) ( \dfrac{1}{u(x)} u'(x) + \dfrac{1}{v(x)} v'(x)) \] But \(y(x) = u(x) \cdot v(x)\) \[ y'(x) = u(x) \cdot v(x) (\dfrac{1}{u(x)} u'(x) + \dfrac{1}{v(x)} v'(x)) \] \[ y'(x) = v(x) \cdot u'(x) + u(x) \cdot v'(x)) \]

Differential of ln(f(x)) proof

 Differential of \(\ln f(x)\) let \(y = \ln f(x)\) Taking exponential on both sides: \[e^{y} = e^{\ln f(x)}\] but \(e^{\ln f(x)} = f(x)\) since e and ln are inverse function of each other \[e^{y} = f(x)\] Differentiating both sides with respect to x (Remember y is a function of x thus when we differentiate y we ought to multiply with its derivative) \[e^{y} \dfrac{dy}{dx} = f'(x)\] \[\dfrac{dy}{dx} = \dfrac{f'(x)}{e^y}\] but \(e^y = f(x)\) \[\dfrac{dy}{dx} = \dfrac{f'(x)}{f(x)}\]

Differential of e^{ax} proof

  Differential of \( e^{ax}\) let \( y = e^{ax}\) Taking the natural log on both sides: \[\ln y = \ln e^{ax}\] Apply one of the logarithm rules: \[\ln y = ax \ln e \] but \[\ln e = 1 \] \[\ln y = ax\] Taking the differential with respect to x: (Remember: y is a function of x therefore after differentiating we multiply by the derivative) \[\dfrac{1}{y} \dfrac{dy}{dx} = a \] \[\dfrac{dy}{dx} = ay\] but \(y = e^{ax}\) \[\dfrac{dy}{dx} = ae^{ax}\]  

Finding the Sum of the First N Integers

 Formula Derivation of the Sum of the first n integers. First Method: Suppose we need to find the sum of the first n positive integers. Then, this can be written mathematically as: \[ S_{n} = \sum_{i=1}^{n} i \] \[ S_{n} = 1 + 2 + 3 + \cdot \cdot \cdot + n \]  but the above expression can also be written as (backwards): \[ S_{n} = n + (n-1) + (n-2) + \cdot \cdot \cdot + 1 \] Summing the two equations above:  \[2S_{n} = (n+1) + (n+1) + ... + (n+1) \] \[2S_{n} = n (n+1) \] \[ S_{n} = \dfrac{n(n+1)}{2} \]   Second Method: \[ S_{n} = 1 + 2 + 3 + \cdot \cdot \cdot + n \] Writing in sequence form: \[ S_{1} = 1  \] \[ S_{2} = 1 + 2 = 3 \] \[ S_{3} = 1 + 2 + 3 = 6 \] \[ S_{4} = 1 + 2 + 3 + 4 = 10 \] \[ \cdot \] \[ \cdot \] \[ \cdot \] \[ Seq = 1, 3, 6, 10, 15, ..., \sum_{i=1}^{n} i  \]  Note that the difference between each consecutive sequence is: \[ 1^{st}difference = 2, 3, 4, 5, 6, \cdot \cdot \cdot \] Since the difference is not constant, we take t...