Home
📐 Mathematics

Limits

lim(x→a) f(x) = L

Differentiation Rules

d/dx [f(x)] = f'(x) = lim(h→0) [f(x+h) - f(x)] / h

Standard Derivatives

f(x) f'(x)
sin x cos x
cos x -sin x
tan x sec² x
ln x 1/x
aˣ · ln a
sin⁻¹ x 1 / √(1 - x²)
tan⁻¹ x 1 / (1 + x²)

Integration Formulas

∫ f(x) dx = F(x) + C
∫ f(x) dx Result
∫ xⁿ dx xⁿ⁺¹ / (n+1) + C  (n ≠ -1)
∫ 1/x dx ln |x| + C
∫ eˣ dx eˣ + C
∫ sin x dx -cos x + C
∫ cos x dx sin x + C
∫ sec²x dx tan x + C
∫ 1/(1+x²) dx tan⁻¹ x + C
∫ 1/√(1-x²) dx sin⁻¹ x + C
Integration by Parts: ∫ u dv = uv - ∫ v du  (LIATE rule for choosing u)

Maxima & Minima

💻 C Programming

Data Types & Sizes

Type Size Range / Format
char 1 byte -128 to 127 / %c
int 4 bytes -2³¹ to 2³¹-1 / %d
float 4 bytes 6-7 digits / %f
double 8 bytes 15 digits / %lf
long 4-8 bytes %ld

Operator Precedence (High → Low)

  1. () [] -> . (Postfix)
  2. ! ~ ++ -- + - * & sizeof (Unary)
  3. * / % (Multiplicative)
  4. + - (Additive)
  5. << >> (Shift)
  6. < <= > >= (Relational)
  7. == != (Equality)
  8. &^| (Bitwise)
  9. && || (Logical)
  10. = += -= *= /= (Assignment)

String Functions (#include <string.h>)

Function Purpose
strlen(s) Length of string
strcpy(dest, src) Copy string
strcat(dest, src) Concatenate strings
strcmp(s1, s2) Compare (returns 0 if equal)
strrev(s) Reverse string
strupr(s) Convert to uppercase

Pointer & Array Quick Reference

int arr[5] = {10, 20, 30, 40, 50};
int *p = arr;         // p points to arr[0]
*(p + 2) = 30;        // same as arr[2]
sizeof(arr) = 20;     // 5 * 4 bytes
sizeof(p)   = 4 or 8; // pointer size
malloc(n * sizeof(int)) → allocate n ints
calloc(n, sizeof(int)) → allocate + zero fill
free(ptr) → deallocate memory
🖥️ FCDS — Digital Systems

Number System Conversions

From To Method
Decimal Binary Divide by 2, read remainders bottom-up
Binary Decimal Multiply each bit by 2ⁿ (n = position)
Binary Octal Group 3 bits from right
Binary Hex Group 4 bits from right
1's Complement: Flip all bits
2's Complement: 1's complement + 1
Example: 0101 → 1's: 1010 → 2's: 1011

Boolean Algebra Laws

Logic Gates Quick Reference

Gate Expression Output = 1 when
AND Y = A · B Both inputs are 1
OR Y = A + B At least one input is 1
NOT Y = A' Input is 0
NAND Y = (AB)' Not both 1 (Universal)
NOR Y = (A+B)' Both inputs are 0 (Universal)
XOR Y = A⊕B Inputs are different
🌐 Web Programming

HTML Essential Tags

<!DOCTYPE html>
<html> <head> <title></title> </head>
<body>
  <h1>...<h6>  <p>  <br>  <hr>
  <a href="">  <img src="" alt="">
  <ul><li>  <ol><li>  <table><tr><td>
  <form action="" method="">
    <input type="text|password|submit">
    <textarea>  <select><option>
  </form>
  <div>  <span>  <header>  <footer>
</body></html>

CSS Box Model

Total Width = content + padding-left + padding-right + border-left + border-right + margin-left + margin-right

JavaScript Essentials

// Variables
let x = 10;  const PI = 3.14;  var old = 5;

// Functions
function add(a, b) { return a + b; }
const add = (a, b) => a + b;

// Arrays
let arr = [1,2,3];
arr.push(4); arr.pop(); arr.length;
arr.map(x => x*2); arr.filter(x => x>2);

// DOM
document.getElementById('id');
document.querySelector('.class');
element.addEventListener('click', fn);
element.innerHTML = '<b>Hello</b>';
element.style.color = 'red';
🌿 Environmental Science

Key Concepts & Values

Pollution & Control

Type Key Pollutants Control
Air CO, SO₂, NOₓ, PM Scrubbers, filters, catalytic converters
Water BOD, heavy metals, pathogens STP, ETP, chlorination
Soil Pesticides, heavy metals Bioremediation, composting
Noise >85 dB exposure Barriers, green belts