📐 Mathematics
Limits
lim(x→a) f(x) = L
- L'Hôpital's Rule: If lim f(x)/g(x) = 0/0 or ∞/∞, then
lim f(x)/g(x) = lim f'(x)/g'(x) - Squeeze Theorem: If g(x) ≤ f(x) ≤ h(x) and lim g = lim h = L, then lim f = L
lim(x→0) sin(x)/x = 1lim(x→0) (1 - cos(x))/x = 0lim(x→∞) (1 + 1/x)^x = e
Differentiation Rules
d/dx [f(x)] = f'(x) = lim(h→0) [f(x+h) - f(x)] / h
- Power Rule:
d/dx [xⁿ] = n·xⁿ⁻¹ - Product Rule:
(fg)' = f'g + fg' - Quotient Rule:
(f/g)' = (f'g - fg') / g² - Chain Rule:
d/dx [f(g(x))] = f'(g(x)) · g'(x)
Standard Derivatives
| f(x) | f'(x) |
|---|---|
| sin x | cos x |
| cos x | -sin x |
| tan x | sec² x |
| eˣ | eˣ |
| ln x | 1/x |
| aˣ | 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
- Find critical points: set
f'(x) = 0 - Second Derivative Test:
- f''(c) > 0 → Local Minimum
- f''(c) < 0 → Local Maximum
- f''(c) = 0 → Inconclusive
💻 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)
() [] -> .(Postfix)! ~ ++ -- + - * & sizeof(Unary)* / %(Multiplicative)+ -(Additive)<< >>(Shift)< <= > >=(Relational)== !=(Equality)&→^→|(Bitwise)&& ||(Logical)= += -= *= /=(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
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
2's Complement: 1's complement + 1
Example: 0101 → 1's: 1010 → 2's: 1011
Boolean Algebra Laws
- Identity: A + 0 = A, A · 1 = A
- Complement: A + A' = 1, A · A' = 0
- Idempotent: A + A = A, A · A = A
- De Morgan's:
(A + B)' = A' · B'|(A · B)' = A' + B' - Absorption: A + AB = A, A(A + B) = A
- Distributive: A(B + C) = AB + AC
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
- Selectors:
element,.class,#id,*,parent > child,element:hover - Display:
block|inline|inline-block|flex|grid|none - Position:
static|relative|absolute|fixed|sticky - Flexbox:
display:flex; justify-content; align-items; flex-direction
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
- Atmosphere layers: Troposphere (0-12km) → Stratosphere (12-50km, ozone) → Mesosphere → Thermosphere → Exosphere
- pH Scale: 0-6 Acidic | 7 Neutral | 8-14 Basic
- BOD (Biochemical Oxygen Demand): Higher = more polluted water
- Greenhouse Gases: CO₂, CH₄, N₂O, CFCs, O₃
- Ozone Layer: 15-35 km in Stratosphere, depleted by CFCs
- Food Chain Efficiency: ~10% energy transfer per trophic level
- Biodiversity hotspots: Western Ghats, Eastern Himalayas (in India)
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 |