← Back to Articles
Why Plot Multiple Functions?
Plotting multiple functions on the same graph is one of the most powerful features of mathematical visualization. It allows you to:
- Compare behavior: See how different functions grow, decay, or oscillate
- Find intersections: Identify where functions meet or cross
- Analyze relationships: Understand how functions relate to each other
- Solve equations: Graphically solve f(x) = g(x) problems
- Visualize transformations: Compare original functions with their modifications
Adding Multiple Plots in FooPlot
Method 1: Using "Add Plot" Button
- Enter your first function (e.g.,
x^2
)
- Click "Plot" to display it
- Click the "Add Plot" button
- Enter your second function (e.g.,
2*x + 1
)
- Click "Plot" again
- Both functions now appear on the same graph
Method 2: Managing Multiple Plots
Once you have multiple plots, you can:
- Toggle visibility: Click the eye icon to show/hide individual plots
- Change colors: Each plot gets a different color automatically
- Remove plots: Click the delete button to remove unwanted plots
- Reorder plots: Manage which plots appear on top
Common Multiple Plot Scenarios
1. Comparing Polynomial Degrees
Linear vs Quadratic vs Cubic
Plot 1: x (linear)
Plot 2: x^2 (quadratic)
Plot 3: x^3 (cubic)
See how the growth rate changes with polynomial degree.
Different Quadratics
Plot 1: x^2
Plot 2: 2*x^2
Plot 3: x^2 + 3
Plot 4: (x-2)^2
Compare the effects of scaling and shifting.
2. Trigonometric Comparisons
Sine vs Cosine
Plot 1: sin(x)
Plot 2: cos(x)
See the phase relationship between sine and cosine.
Different Frequencies
Plot 1: sin(x)
Plot 2: sin(2*x)
Plot 3: sin(3*x)
Compare how frequency affects wave patterns.
3. Exponential vs Logarithmic
Plot 1: exp(x)
Plot 2: ln(x)
Plot 3: x (reference line)
These functions are inverses of each other - see how they're symmetric about the line y = x.
Finding Intersections
Graphical Method
When you plot multiple functions, intersection points appear where the curves cross. To find intersections:
- Plot both functions
- Look for crossing points
- Use zoom controls to get more precise coordinates
- Adjust axis ranges for better view of intersection regions
Example: Find where x² = 2x + 3
Plot 1: x^2
Plot 2: 2*x + 3
The intersections occur at approximately x = -1 and x = 3.
Common Intersection Problems
- Quadratic = Linear: Usually 0, 1, or 2 intersection points
- Trigonometric intersections: Often multiple periodic intersections
- Exponential = Polynomial: Typically 1-2 intersection points
- Circle intersections: 0, 1, or 2 points depending on relationship
Analyzing Function Relationships
Growth Rate Comparisons
Fast Growing Functions:
Plot 1: exp(x) (exponential - fastest)
Plot 2: x^3 (cubic polynomial)
Plot 3: x^2 (quadratic)
Plot 4: x (linear - slowest)
Oscillation Comparisons
Damped vs Undamped Oscillations:
Plot 1: sin(x) (constant amplitude)
Plot 2: exp(-x/5)*sin(x) (damped oscillation)
Plot 3: x*sin(x) (growing amplitude)
Function Transformations
Comparing Original with Transformations
Vertical Shifts
Plot 1: x^2
Plot 2: x^2 + 3
Plot 3: x^2 - 2
Horizontal Shifts
Plot 1: x^2
Plot 2: (x-2)^2
Plot 3: (x+1)^2
Scaling
Plot 1: x^2
Plot 2: 2*x^2
Plot 3: 0.5*x^2
Reflections
Plot 1: x^2
Plot 2: -x^2
Plot 3: (-x)^2
Practical Applications
Economics and Business
Revenue vs Cost Analysis:
Plot 1: 50*x - 0.1*x^2 (Revenue function)
Plot 2: 20*x + 100 (Cost function)
Plot 3: 30*x - 0.1*x^2 - 100 (Profit = Revenue - Cost)
Physics Applications
Motion Analysis:
Plot 1: 5*t (constant velocity)
Plot 2: 0.5*9.8*t^2 (free fall distance)
Plot 3: 20*t - 0.5*9.8*t^2 (projectile with initial velocity)
Signal Processing
Frequency Analysis:
Plot 1: sin(x) + sin(3*x) (composite signal)
Plot 2: sin(x) (fundamental frequency)
Plot 3: sin(3*x) (harmonic)
Advanced Multiple Plot Techniques
Piecewise Function Comparison
Compare different pieces of piecewise functions:
Compare parts of |x|:
Plot 1: x (for x ≥ 0)
Plot 2: -x (for x ≤ 0)
Range: -5 to 5
Approximation Analysis
Compare functions with their approximations:
Taylor Series Approximation of sin(x):
Plot 1: sin(x) (actual function)
Plot 2: x (1st order approximation)
Plot 3: x - x^3/6 (3rd order approximation)
Plot 4: x - x^3/6 + x^5/120 (5th order approximation)
Tips for Effective Multiple Plotting
🎯 Pro Tips:
- Use appropriate ranges: Choose x and y ranges that show all important features
- Color coding: Use the automatic color coding to distinguish functions
- Legend awareness: Keep track of which color represents which function
- Zoom strategically: Zoom in on intersection points for better analysis
- Start simple: Begin with 2-3 functions before adding more
Common Mistakes to Avoid
⚠️ Avoid These Pitfalls:
- Too many plots: More than 5-6 functions can become confusing
- Similar colors: Make sure functions are visually distinct
- Wrong ranges: Important features might be outside the viewing window
- Scale issues: Functions with very different scales may not show well together
Interactive Features
Show/Hide Functionality
Use the visibility toggle to:
- Focus on specific function pairs
- Reduce visual clutter
- Create step-by-step reveals
- Compare subsets of your functions
Dynamic Range Adjustment
Adjust ranges to:
- Show global behavior (wide range)
- Focus on local features (narrow range)
- Center on intersection points
- Compare growth rates at different scales
Exercise Challenges
- Polynomial Comparison: Plot x, x², x³, and x⁴ on the same graph. Observe their behavior for x ∈ [-2, 2]
- Trigonometric Family: Plot sin(x), cos(x), and tan(x). What ranges work best?
- Exponential Growth: Compare 2ˣ, 3ˣ, and eˣ. Which grows fastest?
- Intersection Hunt: Find all intersections between x² and 2ˣ
- Transformation Study: Plot f(x) = x² and its transformations: f(x+1), f(x-1), 2f(x), f(2x)
- Inverse Functions: Plot f(x) = x³ and g(x) = ∛x along with y = x
Conclusion
Multiple plotting is a powerful tool for mathematical analysis and understanding. By comparing functions visually, you can gain insights that would be difficult to achieve through algebra alone. Practice with different combinations of functions, and don't hesitate to experiment with various viewing ranges and visibility settings to get the clearest picture of function relationships.
Remember: the goal is insight, not just pretty pictures. Always ask yourself what the multiple plots are telling you about the mathematical relationships involved.