Physics Equations and Diagrams — Documenting Scientific Concepts
Complete guide to documenting physics concepts with KaTeX equations, Mermaid diagrams, and scientific notation
Introduction
Physics documentation requires precise mathematical notation, clear diagrams, and structured explanations. Whether you're documenting classical mechanics, electromagnetism, quantum physics, or any other physics domain, combining KaTeX for equations and Mermaid for diagrams creates professional, accessible scientific documentation.
This guide demonstrates how to document physics concepts effectively using AutEng's powerful features. You'll learn to write complex equations, create informative diagrams, and structure scientific content that's both rigorous and readable.
Why Use AutEng for Physics Documentation?
- • KaTeX Support: Write complex equations with LaTeX syntax
- • Mermaid Diagrams: Create flowcharts, state diagrams, and visual explanations
- • Real-time Preview: See equations and diagrams as you write
- • Version Control: Track changes to your scientific documentation
- • Collaboration: Share documentation with colleagues and students
What You'll Learn
- • How to write physics equations using KaTeX
- • Creating diagrams for physical systems and processes
- • Documenting derivations and proofs
- • Best practices for scientific notation
- • Structuring physics documentation effectively
Classical Mechanics: Newton's Laws
Classical mechanics forms the foundation of physics. Let's document Newton's laws with proper equations and diagrams.
Newton's Second Law
The fundamental equation relating force, mass, and acceleration:
Newton's Second Law
The relationship between force, mass, and acceleration
Newton's Second Law states that the force acting on an object is equal to the mass of the object multiplied by its acceleration:
F=ma
Where:
- F is the net force vector (in Newtons, N)
- m is the mass (in kilograms, kg)
- a is the acceleration vector (in m/s²)
In component form:
Fx=max,Fy=may,Fz=maz
Kinetic Energy
The energy of motion depends on mass and velocity:
Kinetic Energy Formula
Energy of a moving object
The kinetic energy of an object with mass m moving at velocity v is:
KE=21mv2
For a system of particles, the total kinetic energy is:
KEtotal=∑i=1n21mivi2
Derivation from Work-Energy Theorem:
Starting with W=∫Fdx and F=ma=mdtdv:
W=∫mdtdvdx=∫mdtdxdv=∫mvdv=21mv2
Force Diagram
Visualizing forces acting on an object using a flowchart-style diagram:
Free Body Diagram
Forces acting on an object on an inclined plane
Rendering diagram...
Equations of Motion:
Parallel to incline: ma=mgsinθ−f
Perpendicular to incline: N=mgcosθ
Electromagnetism: Maxwell's Equations
Maxwell's equations are the foundation of classical electromagnetism. Here's how to document them with proper notation and context.
The Four Maxwell Equations
Maxwell's Equations in Differential Form
The complete set of equations governing electromagnetic fields
Maxwell's equations describe how electric and magnetic fields are generated and altered by charges and currents:
1. Gauss's Law (Electric):
∇⋅E=ϵ0ρ
Electric field divergence equals charge density divided by permittivity.
2. Gauss's Law (Magnetic):
∇⋅B=0
No magnetic monopoles exist; magnetic field lines form closed loops.
3. Faraday's Law:
∇×E=−∂t∂B
A changing magnetic field induces an electric field.
4. Ampère-Maxwell Law:
∇×B=μ0J+μ0ϵ0∂t∂E
Magnetic fields are generated by currents and changing electric fields.
Where:
- E = electric field (V/m)
- B = magnetic field (T)
- ρ = charge density (C/m³)
- J = current density (A/m²)
- ϵ0 = permittivity of free space
- μ0 = permeability of free space
Electromagnetic Wave Equation
Wave Equation Derivation
How electromagnetic waves propagate through space
Taking the curl of Faraday's law and substituting Ampère-Maxwell law (in vacuum, ρ=0, J=0):
∇×(∇×E)=−∂t∂(∇×B)
Using the vector identity ∇×(∇×E)=∇(∇⋅E)−∇2E and ∇⋅E=0:
−∇2E=−μ0ϵ0∂t2∂2E
This gives the wave equation:
∇2E=μ0ϵ0∂t2∂2E
The wave speed is:
c=μ0ϵ01≈3×108 m/s
Electromagnetic Wave Propagation
EM Wave Diagram
Relationship between electric and magnetic field components
Rendering diagram...
Key Properties:
- Electric and magnetic fields oscillate perpendicular to each other
- Both fields are perpendicular to the direction of propagation
- Energy flows in the direction of E×B (Poynting vector)
Quantum Mechanics: Wave Functions and Operators
Quantum mechanics requires careful notation for wave functions, operators, and probability amplitudes.
Schrödinger Equation
Time-Dependent Schrödinger Equation
The fundamental equation of quantum mechanics
The time-dependent Schrödinger equation describes how quantum states evolve:
iℏ∂t∂Ψ(r,t)=H^Ψ(r,t)
Where:
- Ψ(r,t) is the wave function
- ℏ=h/2π is the reduced Planck constant
- H^ is the Hamiltonian operator
Time-Independent Form:
For stationary states with Ψ(r,t)=ψ(r)e−iEt/ℏ:
H^ψ(r)=Eψ(r)
For a Particle in a Potential:
−2mℏ2∇2ψ+V(r)ψ=Eψ
Heisenberg Uncertainty Principle
Uncertainty Relations
Fundamental limits on simultaneous measurements
The uncertainty principle states that certain pairs of physical properties cannot be simultaneously known to arbitrary precision:
Position-Momentum Uncertainty:
Δx⋅Δp≥2ℏ
Energy-Time Uncertainty:
ΔE⋅Δt≥2ℏ
General Form for Operators:
For any two observables A^ and B^:
ΔA⋅ΔB≥21∣⟨[A^,B^]⟩∣
Where [A^,B^]=A^B^−B^A^ is the commutator.
Quantum State Evolution
State Diagram
Evolution of quantum states through measurement
Rendering diagram...
Key Concepts:
- Before measurement: system exists in superposition of states
- Measurement causes wave function collapse
- Outcome is probabilistic, determined by ∣⟨ψi∣ψ⟩∣2
- After measurement: system is in definite eigenstate
Thermodynamics: Laws and Processes
Thermodynamics deals with heat, work, and energy transfer. Let's document the fundamental laws and key processes.
The Four Laws
Laws of Thermodynamics
The fundamental principles governing energy and entropy
Zeroth Law (Thermal Equilibrium):
If systems A and B are each in thermal equilibrium with system C, then A and B are in thermal equilibrium with each other.
First Law (Energy Conservation):
ΔU=Q−W
Where:
- ΔU = change in internal energy
- Q = heat added to system
- W = work done by system
Second Law (Entropy):
For any thermodynamic process:
ΔSuniverse≥0
The entropy of an isolated system never decreases. For a reversible process:
dS=TdQrev
Third Law (Absolute Zero):
As temperature approaches absolute zero, the entropy of a perfect crystal approaches zero:
limT→0S=0
Carnot Cycle
Carnot Engine Efficiency
The theoretical maximum efficiency of a heat engine
The Carnot cycle represents the most efficient heat engine possible between two temperature reservoirs.
Efficiency:
η=1−THTC=QHW
Where:
- TH = hot reservoir temperature (K)
- TC = cold reservoir temperature (K)
- W = work output
- QH = heat input from hot reservoir
Carnot Cycle Stages:
Rendering diagram...
Key Insight: No real engine can exceed Carnot efficiency.
Ideal Gas Law
Ideal Gas Relationships
Equations of state for ideal gases
Ideal Gas Law:
PV=nRT
Where:
- P = pressure (Pa)
- V = volume (m³)
- n = number of moles
- R = universal gas constant (8.314 J/(mol·K))
- T = temperature (K)
Alternative Forms:
Using n=N/NA where N is number of molecules:
PV=NkT
Where k=R/NA is Boltzmann's constant.
Internal Energy of Ideal Gas:
For a monatomic ideal gas:
U=23nRT
For a diatomic ideal gas:
U=25nRT
Best Practices for Physics Documentation
Follow these guidelines to create clear, accurate, and professional physics documentation.
1. Use Standard Notation
Follow established conventions for symbols and notation:
✅ GOOD: Standard notation
- Vectors: $\vec{F}$, $\vec{v}$, $\vec{E}$
- Scalars: $m$, $T$, $E$
- Operators: $\hat{H}$, $\hat{p}$, $\nabla$
- Constants: $c$, $\hbar$, $k_B$
❌ AVOID: Non-standard notation
- Using F for both force and field
- Inconsistent vector notation
- Undefined symbols2. Define All Variables
Always explain what each symbol represents and include units:
✅ GOOD: Complete definitions
$$F = ma$$
Where:
- $F$ = force (Newtons, N)
- $m$ = mass (kilograms, kg)
- $a$ = acceleration (m/s²)
❌ INCOMPLETE: Missing definitions
$$F = ma$$
(What are F, m, and a?)3. Show Derivations Step-by-Step
Break complex derivations into clear, logical steps:
✅ GOOD: Clear steps
Starting with Newton's second law:
$$F = ma$$
Substituting $a = dv/dt$:
$$F = m\frac{dv}{dt}$$
Multiplying both sides by $dx$:
$$F\,dx = m\frac{dv}{dt}\,dx = mv\,dv$$
Integrating:
$$\int F\,dx = \int mv\,dv = \frac{1}{2}mv^2$$
❌ UNCLEAR: Skipping steps
$$F = ma \implies KE = \frac{1}{2}mv^2$$
(How did we get there?)4. Use Diagrams Effectively
Complement equations with visual representations:
- • Use flowcharts for processes and decision trees
- • Use state diagrams for quantum states and transitions
- • Label all components clearly
- • Use consistent color coding
- • Keep diagrams simple and focused
5. Provide Physical Interpretation
Don't just present equations—explain what they mean physically. Connect mathematical formalism to real-world phenomena and intuition.
6. Include Worked Examples
Demonstrate concepts with concrete numerical examples:
**Example:** Calculate the kinetic energy of a 1000 kg car traveling at 20 m/s.
Given:
- $m = 1000$ kg
- $v = 20$ m/s
Solution:
$$KE = \frac{1}{2}mv^2 = \frac{1}{2}(1000)(20)^2 = 200,000 \text{ J} = 200 \text{ kJ}$$7. Cite Assumptions and Limits
Clearly state when equations apply and when they break down. For example, specify if an equation assumes non-relativistic speeds, ideal conditions, or classical (non-quantum) behavior.
Common Pitfalls & Solutions
Pitfall 1: Inconsistent Notation
Using the same symbol for different quantities or switching notation mid-document.
❌ WRONG: Inconsistent use of E
$$E = mc^2$$ (E for energy)
$$E = \frac{kq}{r^2}$$ (E for electric field)
✅ CORRECT: Distinct symbols
$$E = mc^2$$ (E for energy)
$$\vec{E} = \frac{kq}{r^2}\hat{r}$$ (𝐄⃗ for electric field)Pitfall 2: Missing Units or Dimensions
Forgetting to specify units makes equations ambiguous and error-prone.
❌ WRONG: No units
The speed of light is $c = 3 \times 10^8$
✅ CORRECT: Include units
The speed of light is $c = 3 \times 10^8$ m/s
✅ BETTER: Dimensional analysis
$$[c] = \frac{[L]}{[T]} = \text{m/s}$$Pitfall 3: Confusing Scalars and Vectors
Not distinguishing between scalar and vector quantities leads to confusion.
❌ WRONG: Unclear if vector or scalar
$$F = ma$$
✅ CORRECT: Clear vector notation
$$\vec{F} = m\vec{a}$$
Or in component form:
$$F_x = ma_x, \quad F_y = ma_y, \quad F_z = ma_z$$Pitfall 4: Overly Complex Diagrams
Trying to show too much in one diagram makes it hard to understand.
❌ AVOID:
- • Cramming multiple concepts into one diagram
- • Using too many colors or styles
- • Unlabeled or poorly labeled components
- • Overly detailed technical drawings
✅ INSTEAD:
- • Create separate diagrams for different concepts
- • Use consistent, minimal color schemes
- • Label everything clearly
- • Focus on the key idea
Pitfall 5: Skipping Mathematical Steps
Jumping from one equation to another without showing the intermediate steps.
❌ WRONG: Missing steps
$$\nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t}$$
Therefore:
$$\nabla^2\vec{E} = \mu_0\epsilon_0\frac{\partial^2 \vec{E}}{\partial t^2}$$
✅ CORRECT: Show the derivation
Starting with Faraday's law:
$$\nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t}$$
Take the curl of both sides:
$$\nabla \times (\nabla \times \vec{E}) = -\frac{\partial}{\partial t}(\nabla \times \vec{B})$$
Apply Ampère-Maxwell law and vector identity...
[Continue with full derivation]Advanced Documentation Techniques
Take your physics documentation to the next level with these advanced techniques.
Tensor Notation
For advanced topics like general relativity, use proper tensor notation:
Einstein field equations in tensor notation:
$$G_{\mu\nu} + \Lambda g_{\mu\nu} = \frac{8\pi G}{c^4}T_{\mu\nu}$$
Where:
- $G_{\mu\nu}$ = Einstein tensor
- $g_{\mu\nu}$ = metric tensor
- $\Lambda$ = cosmological constant
- $T_{\mu\nu}$ = stress-energy tensor
- Greek indices run from 0 to 3 (spacetime)Bra-Ket Notation
For quantum mechanics, use Dirac notation consistently:
Quantum state: $|\psi\rangle$
Dual state: $\langle\psi|$
Inner product: $\langle\phi|\psi\rangle$
Outer product: $|\psi\rangle\langle\phi|$
Expectation value: $\langle\psi|\hat{A}|\psi\rangle$
Example - Spin states:
$$|\uparrow\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad |\downarrow\rangle = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$$Matrix Representations
Use matrices for operators and transformations:
Pauli matrices for spin-1/2:
$$\sigma_x = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad
\sigma_y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad
\sigma_z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$$
Rotation matrix in 2D:
$$R(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}$$Combining Multiple Representations
Show the same concept in different forms for deeper understanding:
- • Differential form and integral form
- • Coordinate representation and abstract notation
- • Time domain and frequency domain
- • Position space and momentum space
Conclusion
Effective physics documentation combines precise mathematical notation, clear diagrams, and thoughtful explanations. By using KaTeX for equations and Mermaid for diagrams, you can create professional scientific documentation that's both rigorous and accessible.
Key Takeaways
- • Use standard notation and define all variables
- • Show derivations step-by-step with clear explanations
- • Complement equations with diagrams and visual aids
- • Provide physical interpretation alongside mathematical formalism
- • Include worked examples and specify assumptions
- • Keep diagrams focused and well-labeled
- • Maintain consistency throughout your documentation
Next Steps
Ready to create your own physics documentation? Start with:
- • Review the KaTeX Syntax Guide for equation formatting
- • Explore Mermaid diagrams for visual representations
- • Check out documentation best practices
- • Start documenting your own physics concepts and experiments
Related Content
KaTeX Syntax Quick Reference — Math Equations in Markdown
Complete reference for KaTeX mathematical notation including common formulas, symbols, and usage patterns for technical documentation.
Documentation Best Practices — Markdown + Mermaid + KaTeX
Comprehensive guide to creating exceptional technical documentation using Markdown, Mermaid diagrams, and KaTeX equations together
Markdown, Mermaid & KaTeX Syntax
Complete syntax reference for Markdown, Mermaid diagrams, and KaTeX math equations
Ready to Start?
Start creating beautiful technical documentation with AutEng.
Get Started with AutEng