/Calculus_Assignment_PLD4

To implement a Python program that analyzes quadratic functions computes derivatives, identifies critical points, and visualizes the functions.

Primary LanguageJupyter Notebook

Quadratic Function Analysis Project

Objective:

Our objective is to develop a Python program that analyzes quadratic functions, computes their derivatives, identifies critical points (minima and maxima), and visualizes these functions in a clear and informative way. Additionally, we’ll calculate the area under the curve for a complete analysis.

Project Breakdown:

  1. Derivative Calculation: We started by writing a dynamic function that calculates the derivative of any given function with respect to x. The function is flexible enough to take an input function f(x) and return its derivative.
  2. Test the Derivative Function: We defined a complex equation with at least two minima and two maxima. Using this equation, we tested the derivative function from the first step to verify that it works correctly.
  3. Visualizing the Equation: We used Matplotlib to visualize the equation. The graph shows the behavior of the function, including the minima and maxima points.
  4. Identifying Minima and Maxima: After plotting, we created arrays to store the x-values of the minima and maxima points. We then printed these arrays to display the critical points and ensure our calculations are accurate.
  5. Global Minima and Maxima: We computed the global minima and maxima of the equation. Once computed, we printed their coordinates to identify the overall minimum and maximum values of the function.
  6. Visualizing Global Minima and Maxima: On our graph, we added clear and distinguishable markers to highlight the global minima and maxima. This will ensure that these critical points are easily identifiable on the plot.
  7. Finding the Area Under the Curve: We implemented a method to compute the area under the curve of the equation to enhance the overall analysis.

Tools We Used:

  • Python 3.x

Libraries:

  • numpy for handling mathematical and numeric operations.
  • sympy for symbolic mathematics and derivative calculations.
  • matplotlib for plotting the graphs.

Contributors

  • Abimbola Ronald
  • Justice Chukwuonye
  • Jordan Nguepi
  • Eunice Adewusi
  • Glen Miracle