Modeling with Functions — Lecture Notes

Modeling with Functions: Key Concepts

  • Modeling is a way to translate real-world situations into mathematical descriptions that reveal how or why something behaves the way it does.

  • A model describes the relationship between elements of a system (the cause, inputs, and outputs) and the underlying logic that connects them.

  • Visualizing the problem is the first step in modeling: identify what you’re trying to understand or predict.

  • You’ll typically need data or parameters to describe the situation, and you’ll assign variables to represent those quantities.

  • A model often leads to a functional relationship, i.e., a function, that maps inputs (independent variables) to outputs (dependent variables).

  • Graphing can illustrate outcomes and trends, but it is the resulting model (the function) that provides predictive power.

  • Modeling with functions emphasizes turning abstract ideas into precise, testable statements about how the world works.

  • The process is iterative: you may need to re-visualize, redefine variables, or reframe the model as new information emerges.

  • Practical implications: models guide decisions, predictions, and optimizations in engineering, science, and everyday problem solving.

What do we mean by a model?

  • A model is anything that describes how or why something is the way it is; it encodes the logic behind a phenomenon.

  • Example concept: if a chicken lays 2 eggs every day, the total eggs after x days is modeled by a function:
    f(x)=2xf(x) = 2x

  • In this class, we focus on modeling with functions, i.e., describing how a quantity depends on another.

  • A model is not the same as simply graphing data; graphing is often the end result or a tool, but the model is the descriptive equation that captures the relationship.

General steps for modeling with functions

  • Step 1: Visualize

    • Identify the key components to analyze (e.g., what to measure, what counts as outcomes).

    • Example: eggs produced over days; events happening over time.

  • Step 2: Assign variables

    • Define variables for all relevant quantities (e.g., number of eggs, days, distances).

    • Use clear notation for each quantity.

  • Step 3: Express all variables in terms of an input (independent) variable

    • Choose an input variable (often x) and express other quantities as functions of x.

    • Example: if the input is the number of days, express eggs as a function of days.

  • Step 4: Solve for desired information (predictions, optimization, etc.)

    • Use the model to compute predictions or determine optimal values.

    • You may need to manipulate the equation (algebra, completing the square, etc.) to reveal the desired information.

  • Remember: you may need to reanalyze and redefine components of your visualization as you progress.

Worked example: minimizing the sum of a number and its reciprocal

  • Problem statement (modeled scenario): Find the positive number n > 0 such that the sum of the number and its reciprocal is as small as possible.

  • Step 1: Visualize key components

    • The variable: a positive number n.

    • The reciprocal: 1/n.

    • The quantity to minimize: S(n)=n+1nS(n) = n + \frac{1}{n}

  • Step 2: Assign variables

    • Input variable: n (positive real number).

    • Output: S(n).

  • Step 3: Express all variables in terms of the input

    • Already expressed: S(n)=n+1nS(n) = n + \frac{1}{n}

  • Step 4: Solve / find minimum information

    • Approach 1: Consider derivation (calculus) or completing the square.

    • Using calculus:
      S(n)=11n2S'(n) = 1 - \frac{1}{n^2}
      Set S'(n)=0: 1 - \frac{1}{n^2} = 0 \Rightarrow n^2 = 1 \Rightarrow n = 1
      \ (n>0)
      Check second derivative: S''(n) = \frac{2}{n^3} > 0 \text{ for } n>0
      Therefore n = 1 yields a minimum.

    • Value at minimum: S(1)=1+11=2S(1) = 1 + \frac{1}{1} = 2

    • Approach 2 (alternative, no calculus): complete the square or use AM-GM to show the minimum occurs at n=1 with value 2.

  • Takeaway: This example illustrates how a visualization leads to a function, which you then optimize using algebra/calculus as appropriate.

Parabolas and completing the square (key algebraic technique)

  • When you encounter a quadratic in x, you can rewrite it in vertex form to identify the maximum or minimum value.

  • General quadratic form: y=ax2+bx+cy = a x^2 + b x + c

    • The vertex form:
      y=a(xh)2+ky = a (x - h)^2 + k

    • Vertex is at (h, k); for a > 0 the parabola opens upward (minimum at x=h); for a < 0 it opens downward (maximum at x=h).

  • How to move from standard to vertex form (completing the square):

    • Start with y=ax2+bx+cy = a x^2 + b x + c

    • Move the constant term: yc=ax2+bxy - c = a x^2 + b x

    • Factor the leading coefficient from the x-terms: if desired, write as yc=a(x2+bax)y - c = a \left(x^2 + \frac{b}{a}x\right)

    • Add and subtract the square of half the x-coefficient inside the bracket:
      yc=a(x2+bax+(b2a)2)a(b2a)2y - c = a \left(x^2 + \frac{b}{a}x + \left(\frac{b}{2a}\right)^2 \right) - a \left(\frac{b}{2a}\right)^2

    • This yields the vertex form after simplifying:
      y=a(x+b2a)2+(cb24a)y = a \left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)

    • From this, the vertex is at

    • h=b2ah = -\frac{b}{2a}

    • k=cb24ak = c - \frac{b^2}{4a}

  • Significance: Completing the square reveals the parabola’s vertex and maximum/minimum value directly, which aids optimization problems.

Worked example: converting a quadratic to vertex form through completing the square

  • Given a quadratic in standard form: y=ax2+bx+cy = a x^2 + b x + c

  • Steps (briefly summarized as shown in the lecture):

    • Move the constant: yc=ax2+bxy - c = a x^2 + b x

    • Normalize the leading coefficient if needed by factoring out a: yca=x2+bax\frac{y - c}{a} = x^2 + \frac{b}{a}x

    • Complete the square: add and subtract (b2a)2\left(\frac{b}{2a}\right)^2 inside the parentheses:
      yca+(b2a)2=(x+b2a)2\frac{y - c}{a} + \left(\frac{b}{2a}\right)^2 = \left(x + \frac{b}{2a}\right)^2

    • Multiply by a to isolate y and obtain the vertex form:
      y=a(x+b2a)2+cb24ay = a \left(x + \frac{b}{2a}\right)^2 + c - \frac{b^2}{4a}

  • Practical note: Vertex form makes it easy to read off the vertex and the maximum/minimum value of the quadratic directly.

Practical intuition: connecting to the vertex form and earlier steps

  • The vertex form provides direct geometric interpretation: the parameter h shifts the parabola left-right; k shifts it up-down; a controls opening and width.

  • When solving optimization problems, you often look for turning points where the derivative is zero or where the parabola’s vertex gives the extremum.

  • Completing the square is not just an algebraic trick; it is the constructive method that underpins the vertex form.

Worked example: the adjacent rectangular pens problem (modeling with a single input)

  • Problem setup: Build two adjacent rectangular pens sharing a fence with a fixed total amount of fencing: 1{,}000 feet of fence available.

  • Visualization:

    • Two rectangular pens placed side by side, sharing a wall along their common boundary.

    • Each pen has width x (horizontal dimension) and height y (vertical dimension).

    • The diagram includes the outer boundary plus the interior shared fence.

  • Step 1: Visualize key components

    • Perimeter budget P = 1000 ft; the fencing runs around the outside and includes the shared interior fence.

  • Step 2: Assign variables

    • Let x be the width (horizontal dimension) and y be the height (vertical dimension).

    • Let A be the total area of the two pens: A = x × y.

    • Let P be the total fencing: P = 3y + 2x = 1000.

  • Step 3: Express all variables in terms of the input variable

    • Solve the perimeter equation for y in terms of x:
      y=10002x3y = \frac{1000 - 2x}{3}

    • Substitute into the area expression to express A solely in terms of x:
      A(x)=xy=x10002x3=1000x2x23A(x) = x \cdot y = x \cdot \frac{1000 - 2x}{3} = \frac{1000x - 2x^2}{3}

  • Step 4: Solve for the desired information (maximize the area)

    • The area as a function of x is a downward-opening quadratic (a < 0 with a = -2/3):
      A(x)=23x2+10003xA(x) = -\frac{2}{3}x^2 + \frac{1000}{3}x

    • To find the maximum, either: (i) complete the square or (ii) use the vertex formula x_vertex = -\frac{b}{2a} with a = -\frac{2}{3}, b = \frac{1000}{3}.

    • Using the vertex formula:
      xmax=b2a=100032(23)=10003143=1000334=250x_{max} = -\frac{b}{2a} = -\frac{\frac{1000}{3}}{2(-\frac{2}{3})} = -\frac{1000}{3} \cdot \frac{1}{-\frac{4}{3}} = \frac{1000}{3} \cdot \frac{3}{4} = 250

    • Maximum area value:
      Amax=A(250)=250100022503=25010005003=2505003=125,000341,666.67 square feetA_{max} = A(250) = 250 \cdot \frac{1000 - 2\cdot 250}{3} = 250 \cdot \frac{1000 - 500}{3} = 250 \cdot \frac{500}{3} = \frac{125{,}000}{3} \approx 41{,}666.67 \text{ square feet}

  • Alternative representation (completing the square):

    • Rewrite A(x) in vertex form:
      A(x)=23x2+10003x=23(x2500x)=23[(x250)22502]A(x) = -\frac{2}{3}x^2 + \frac{1000}{3}x = -\frac{2}{3}\left(x^2 - 500x\right) = -\frac{2}{3}\left[(x - 250)^2 - 250^2\right]
      =23(x250)2+232502=23(x250)2+125,0003= -\frac{2}{3}(x - 250)^2 + \frac{2}{3} \cdot 250^2 = -\frac{2}{3}(x - 250)^2 + \frac{125{,}000}{3}

    • So the vertex is at (h, k) = (250, 125000/3) and the maximum area is the value k = 125000/3.

  • Domain considerations:

    • Since y must be nonnegative, 1000 - 2x ≥ 0 ⇒ x ≤ 500; and x ≥ 0 since width cannot be negative.

    • The vertex x = 250 lies within [0, 500], so the maximum is attainable in the feasible domain.

  • Summary of the model:

    • Model equation for area as a function of the adjustable width x:
      A(x)=1000x2x23A(x) = \frac{1000x - 2x^2}{3}

    • Maximum occurs at
      x=250,Amax=125,0003square feetx = 250, \quad A_{max} = \frac{125{,}000}{3} \,\text{square feet}

  • Why this modeling approach is useful:

    • It turns a fencing and area problem into a clear optimization task with a single input variable.

    • It shows how constraints translate into a functional form that can be analyzed algebraically or graphically.

    • It demonstrates alternative representations (standard form vs vertex form) and how they reveal the optimum.

  • Connection to the lecture’s broader themes:

    • The problem is a concrete example of modeling with a function: choose inputs, derive a function for the outcome, and optimize.

    • It shows how to handle a system with multiple pieces (two pens, shared boundary) by counting components (three vertical segments and two horizontal segments) to form the perimeter equation.

    • It highlights the idea that the same model can be manipulated in several equivalent ways (A as a function of x, or vertex-form expression) to reach the same conclusion.

  • Practical implications and considerations:

    • The approach assumes straight-line fencing and rectangular pens; real-world constraints (costs, weather, material thickness) could modify the model.

    • The exercise emphasizes checking feasibility of the solution within the problem’s constraints and interpreting the results (e.g., a maximum area occurs at x = 250).

    • In real applications, you might also consider sensitivity: how much does a small change in x affect A, and is the maximum robust to slight changes in the perimeter budget (P)?

Connections to calculus, intuition, and problem framing

  • While calculus can provide quick optimization via derivatives, the same problem can be solved by completing the square or by recognizing a quadratic in standard form.

  • The modeling mindset: you first set up a model, then use the right mathematical tools to analyze it (algebra, geometry, calculus as needed).

  • The speaker emphasizes that the calculus solution is not always necessary to know the model; you can still reason about the model and gain insights and predictions from it.

  • The process can be iterative: if a model doesn’t fit, re-visualize, re-define variables, or re-structure the equations.

Practical takeaways about modeling with functions

  • Always start with visualization and a clear statement of what you’re trying to predict or optimize.

  • Define input variables carefully and express all quantities explicitly in terms of those inputs.

  • When optimizing, recognize the mathematical structure (linear, quadratic, etc.) and choose the appropriate technique (calculus, completing the square, vertex form).

  • Remember that different representations of the same model (e.g., A(x) in standard form vs vertex form) can illuminate different aspects of the problem (e.g., the maximum value and the location of the maximum).

  • Real-world modeling is inherently iterative and depends on the quality of the data and the validity of the assumptions.