Andrew Gurung
  • Introduction
  • Data Science
    • Natural Language Processing
      • Sentiment analysis using Twitter
    • Linear Algebra
      • Linear algebra explained in four pages
      • Vectors
        • Vector Basics
        • Vector Projection
        • Cosine Similarity
        • Vector Norms and Orthogonality
        • Linear combination and span
        • Linear independence and Basis vectors
      • Matrices
        • Matrix Arithmetic
        • Matrix Operations
        • Functions and Linear Transformations
        • Matrix types
      • Eigendecomposition, Eigenvectors and Eigenvalues
      • Principle Component Analysis (PCA)
      • Singular-Value Decomposition(SVD)
      • Linear Algebra: Deep Learning Book
    • Calculus
      • Functions, Limits, Continuity and Differentiability
      • Scalar Derivative and Partial Derivatives
      • Gradient
      • Matrix Calculus
      • Maxima and Minima using Derivatives
      • Gradient Descent and its types
    • Statistics and Probability
      • Probability Rules and Axioms
      • Types of Events
      • Frequentist vs Bayesian View
      • Random Variables
      • MLE, MAP, and Naive Bayes
      • Probability Distributions
      • P-Value and hypothesis test
    • 7 Step DS Process
      • 1: Business Requirement
      • 2: Data Acquisition
      • 3: Data Processing
        • SQL Techniques
        • Cleaning Text Data
      • 4: Data Exploration
      • 5: Modeling
      • 6: Model deployment
      • 7: Communication
    • Miscellaneous
      • LaTeX commands
  • Computer Science
    • Primer
      • Big O Notation
  • Life
    • Health
      • Minimalist Workout Routine
      • Reddit FAQ on Nootropics
      • Hiking/Biking Resources
    • Philosophy
      • Aristotle's Defense of Private Property
    • Self-improvement
      • 100 Mental Models
      • Don't break the chain
      • Cal Newport's 5 Productivity tips
      • Andrew Ng's advice on deliberate practice
      • Atomic Habits
      • Turn sound effects off in Outlook
    • Food and Travel
      • 2019 Guide to Pesticides in Produce
      • Recipe
        • Spicy Sesame Noodles
      • Travel
        • Hiking
    • Art
      • Scott Adams: 80% of the rules of good writing
      • Learn Blues Guitar
    • Tools
      • Software
        • Docker
        • Visual Studio Code
        • Terminal
        • Comparing Git Workflow
      • Life Hacks
        • DIY Deck Cleaner
  • Knowledge Vault
    • Book
      • The Almanack of Naval Ravikant
    • Media
    • Course/Training
Powered by GitBook
On this page
  • Local Maximum or Local Minimum
  • Global (or Absolute) Maximum and Minimum
  • Finding Maxima and Minima using Derivatives
  • Steps to Find the maxima and minima for:
  • Concavity

Was this helpful?

  1. Data Science
  2. Calculus

Maxima and Minima using Derivatives

PreviousMatrix CalculusNextGradient Descent and its types

Last updated 6 years ago

Was this helpful?

A maximum is a high point and a minimum is a low point.

  • The plural of Maximum is Maxima

  • The plural of Minimum is Minima

  • Maxima and Minima are collectively called Extrema

Local Maximum or Local Minimum

First we need to choose an interval:

The local maximum is the point where the height of the function at "a" is greater than (or equal to) the height anywhere else in that interval.

Local Maximum: f(a)≥f(x) f(a) ≥ f(x)f(a)≥f(x) for all x in the interval Local Minimum: f(a)≤f(x) f(a) ≤ f(x)f(a)≤f(x) for all x in the interval

Global (or Absolute) Maximum and Minimum

The maximum or minimum over the entire function is called an "Absolute" or "Global" maximum or minimum. There is ONLY one global maximum and one global minimum.

Finding Maxima and Minima using Derivatives

In a smoothly changing function a maximum or minimum is always where the function flattens out except for a saddle point (A stationary point but not an extremum).

Note: When a function flattens out, the slope is zero. Derivatives is helpful to find where the slope is zero.

Steps to Find the maxima and minima for: y=5x3+2x2−3xy = 5x^3 + 2x^2 − 3xy=5x3+2x2−3x

  1. Given a function y=f(x)=5x3+2x2−3xy = f(x) = 5x^3 + 2x^2 − 3xy=f(x)=5x3+2x2−3x

  2. Find slope of f(x)f(x)f(x) using derivatives dfdx\frac{df}{dx}dxdf​

    f′(x)=dfdx=15x2+4x−3f'(x) = \frac{df}{dx} = 15x^2 + 4x − 3 f′(x)=dxdf​=15x2+4x−3 .....(i)

  3. Take a second derivative of the first slope ddx(dfdx)\frac{d}{dx}(\frac{df}{dx})dxd​(dxdf​) Note: First slope can be found from Step 2 f′′(x)=d(15x2+4x−3)dx=30x+4f''(x) = \frac{d( 15x^2 + 4x − 3 )}{dx} = 30x+4f′′(x)=dxd(15x2+4x−3)​=30x+4

  4. If the second derivative is:

    1. less than 0, it is a local maximum

    2. greater than 0, it is a local minimum

    3. equal to 0, then the test fails (Could be a saddle point)

    At x=−35x = -\frac{3}{5}x=−53​ f′′(x)=30(−35)+4=−14 f''(x) = 30(-\frac{3}{5}) + 4 = −14f′′(x)=30(−53​)+4=−14 which is less than 0, so local maximum is at x=−35x = -\frac{3}{5}x=−53​

    At x=13x = \frac{1}{3}x=31​ f′′(x)=30(13)+4=14 f''(x) = 30(\frac{1}{3}) + 4 = 14f′′(x)=30(31​)+4=14 which is greater than 0, so local maximum is at x=13x = \frac{1}{3}x=31​

Concavity

Taking the derivative f'(x) of a function f(x) gives the slope.

  • When the slope continually increases, the function is concave upward.

  • When the slope continually decreases, the function is concave downward.

Using the second derivative f''(x):

  • When the second derivative is positive, the function is concave upward.

  • When the second derivative is negative, the function is concave downward.

Slope is zero at extrema. So, use dfdx=0\frac{df}{dx} = 0dxdf​=0 to solve for x. This would give the position of x-coordinates the local minima or maxima Solve: 15x2+4x−3=015x^2 + 4x − 3 = 015x2+4x−3=0 The above equation is a quadratic ( ax2+bx+c=0ax^2+bx+c=0ax2+bx+c=0 ) x=−35;x=13x = -\frac{3}{5}; x = \frac{1}{3}x=−53​;x=31​

Link: - - - KhanAcademy: - KhanAcademy:

MathsIsFun: Maxima and Minima of Functions
MathsIsFun: Finding Maxima and Minima using Derivatives
Maxima, Minima and Saddle Points
Concavity