Practice Tasks - Session 05-06

Optimization & Curve Sketching

Author

Dr. Nikolai Heinrichs & Dr. Tobias Vlćek

Part 1: First and Second Derivative Tests

Problem 1: First Derivative Test (xx)

Find all critical points of \(f(x) = x^3 - 3x^2 - 9x + 5\) and classify each using the first derivative test.

Step 1: Find the derivative: \[f'(x) = 3x^2 - 6x - 9 = 3(x^2 - 2x - 3) = 3(x-3)(x+1)\]

Step 2: Critical points occur where \(f'(x) = 0\): \[x = -1 \text{ or } x = 3\]

Step 3: Create a sign chart:

Interval Test Point \(f'(x)\) \(f\) behavior
\(x < -1\) \(x = -2\) \(3(-5)(-1) = 15 > 0\) Increasing
\(-1 < x < 3\) \(x = 0\) \(3(-3)(1) = -9 < 0\) Decreasing
\(x > 3\) \(x = 4\) \(3(1)(5) = 15 > 0\) Increasing

Step 4: Classify:

  • At \(x = -1\): \(f'\) changes from \((+)\) to \((-)\)Local maximum
  • At \(x = 3\): \(f'\) changes from \((-)\) to \((+)\)Local minimum

Function values:

  • \(f(-1) = -1 - 3 + 9 + 5 = 10\) (local max)
  • \(f(3) = 27 - 27 - 27 + 5 = -22\) (local min)

Problem 2: Second Derivative Test (xx)

Use the second derivative test to classify all critical points of: \[g(x) = 2x^3 - 9x^2 + 12x - 3\]

Step 1: Find critical points: \[g'(x) = 6x^2 - 18x + 12 = 6(x^2 - 3x + 2) = 6(x-1)(x-2)\]

Critical points: \(x = 1\) and \(x = 2\)

Step 2: Find the second derivative: \[g''(x) = 12x - 18\]

Step 3: Evaluate \(g''\) at each critical point:

At \(x = 1\): \[g''(1) = 12(1) - 18 = -6 < 0\]Local maximum

At \(x = 2\): \[g''(2) = 12(2) - 18 = 6 > 0\]Local minimum

Function values:

  • \(g(1) = 2 - 9 + 12 - 3 = 2\) (local max)
  • \(g(2) = 16 - 36 + 24 - 3 = 1\) (local min)

Problem 3: When Second Derivative Test Fails (xxx)

For \(h(x) = x^4 - 4x^3\):

  1. Find all critical points.

  2. Attempt to classify them using the second derivative test.

  3. For any critical point where the second derivative test fails, use the first derivative test.

Part a: Critical points \[h'(x) = 4x^3 - 12x^2 = 4x^2(x - 3)\]

Critical points: \(x = 0\) and \(x = 3\)

Part b: Second derivative test \[h''(x) = 12x^2 - 24x = 12x(x - 2)\]

At \(x = 0\): \[h''(0) = 0\]Inconclusive! (Test fails)

At \(x = 3\): \[h''(3) = 12(3)(1) = 36 > 0\]Local minimum

Part c: First derivative test for \(x = 0\)

Sign chart for \(h'(x) = 4x^2(x-3)\):

Interval \(x^2\) \(x-3\) \(h'(x)\)
\(x < 0\) \(+\) \(-\) \(-\)
\(0 < x < 3\) \(+\) \(-\) \(-\)
\(x > 3\) \(+\) \(+\) \(+\)

At \(x = 0\): \(h'\) does not change sign (stays negative on both sides) → Neither a maximum nor a minimum

Summary:

  • \(x = 0\): Neither (horizontal tangent but not an extremum)
  • \(x = 3\): Local minimum with \(h(3) = 81 - 108 = -27\)

Problem 4: Comparing Both Tests (xx)

For \(f(x) = x^4 - 8x^2 + 5\):

  1. Find all critical points.

  2. Classify them using the second derivative test.

  3. Verify your classifications using the first derivative test.

Part a: Critical points \[f'(x) = 4x^3 - 16x = 4x(x^2 - 4) = 4x(x-2)(x+2)\]

Critical points: \(x = -2, 0, 2\)

Part b: Second derivative test \[f''(x) = 12x^2 - 16\]

At \(x = -2\): \(f''(-2) = 12(4) - 16 = 48 - 16 = 32 > 0\)Local min

At \(x = 0\): \(f''(0) = -16 < 0\)Local max

At \(x = 2\): \(f''(2) = 12(4) - 16 = 32 > 0\)Local min

Part c: First derivative test verification

Sign chart for \(f'(x) = 4x(x-2)(x+2)\):

Interval Sign \(f\) behavior
\(x < -2\) \(4(-)(-)(-) = -\) Decreasing
\(-2 < x < 0\) \(4(-)(-)( +) = +\) Increasing
\(0 < x < 2\) \(4(+)(-)(+) = -\) Decreasing
\(x > 2\) \(4(+)(+)(+) = +\) Increasing

Verification:

  • \(x = -2\): Changes from \((-)\) to \((+)\)Local min
  • \(x = 0\): Changes from \((+)\) to \((-)\)Local max
  • \(x = 2\): Changes from \((-)\) to \((+)\)Local min

Both methods agree!

Part 2: Global Extrema on Intervals

Problem 5: Finding Absolute Extrema (xx)

Find the absolute maximum and minimum values of \(f(x) = x^3 - 6x^2 + 9x + 1\) on the interval \([0, 4]\).

Step 1: Find critical points in \((0, 4)\): \[f'(x) = 3x^2 - 12x + 9 = 3(x^2 - 4x + 3) = 3(x-1)(x-3)\]

Critical points: \(x = 1\) and \(x = 3\) (both in the interval)

Step 2: Evaluate \(f\) at critical points and endpoints:

\(x\) \(f(x) = x^3 - 6x^2 + 9x + 1\) Type
\(0\) \(0 - 0 + 0 + 1 = 1\) Endpoint
\(1\) \(1 - 6 + 9 + 1 = 5\) Critical
\(3\) \(27 - 54 + 27 + 1 = 1\) Critical
\(4\) \(64 - 96 + 36 + 1 = 5\) Endpoint

Step 3: Identify extrema:

  • Absolute maximum: \(f(1) = f(4) = 5\)
  • Absolute minimum: \(f(0) = f(3) = 1\)

Answer: Max = 5 (at \(x=1\) and \(x=4\)); Min = 1 (at \(x=0\) and \(x=3\))

Problem 6: Closed Interval Method (xx)

Find the absolute extrema of \(g(x) = \frac{x}{x^2 + 1}\) on \([-2, 2]\).

Step 1: Find critical points using quotient rule: \[g'(x) = \frac{(x^2+1)(1) - x(2x)}{(x^2+1)^2} = \frac{x^2 + 1 - 2x^2}{(x^2+1)^2} = \frac{1 - x^2}{(x^2+1)^2}\]

Set \(g'(x) = 0\): \[1 - x^2 = 0\] \[x = \pm 1\]

Both critical points are in \([-2, 2]\).

Step 2: Evaluate at critical points and endpoints:

\(x\) \(g(x) = \frac{x}{x^2+1}\)
\(-2\) \(\frac{-2}{5} = -0.4\)
\(-1\) \(\frac{-1}{2} = -0.5\)
\(1\) \(\frac{1}{2} = 0.5\)
\(2\) \(\frac{2}{5} = 0.4\)

Answer:

  • Absolute maximum: \(g(1) = 0.5\)
  • Absolute minimum: \(g(-1) = -0.5\)

Problem 7: Optimization with Constraints (xxx)

A rectangular box with a square base and no top is to have a volume of 32 cubic meters. Find the dimensions that minimize the surface area.

Step 1: Set up variables. Let \(x\) = side length of square base, \(h\) = height

Step 2: Write constraint and objective function.

Volume constraint: \(V = x^2 h = 32\), so \(h = \frac{32}{x^2}\)

Surface area (no top): \(S = x^2 + 4xh\) (base + 4 sides)

Step 3: Express \(S\) in terms of one variable: \[S(x) = x^2 + 4x \cdot \frac{32}{x^2} = x^2 + \frac{128}{x}\]

Step 4: Find critical points: \[S'(x) = 2x - \frac{128}{x^2}\]

Set \(S'(x) = 0\): \[2x = \frac{128}{x^2}\] \[2x^3 = 128\] \[x^3 = 64\] \[x = 4\]

Step 5: Verify it’s a minimum: \[S''(x) = 2 + \frac{256}{x^3}\] \[S''(4) = 2 + \frac{256}{64} = 2 + 4 = 6 > 0\] → Minimum ✓

Step 6: Find other dimension: \[h = \frac{32}{16} = 2\]

Answer: Square base with side \(x = 4\) m, height \(h = 2\) m minimizes surface area.

Problem 8: Absolute Extrema with Domain Restrictions (xxx)

Find the absolute extrema of \(f(x) = xe^{-x}\) on \([0, 3]\).

(Note: You may use the fact that \((e^{-x})' = -e^{-x}\))

Step 1: Find critical points using product rule: \[f'(x) = 1 \cdot e^{-x} + x \cdot (-e^{-x}) = e^{-x}(1 - x)\]

Set \(f'(x) = 0\):

Since \(e^{-x} > 0\) for all \(x\): \[1 - x = 0\] \[x = 1\]

Critical point: \(x = 1\) ✓ (in \([0,3]\))

Step 2: Evaluate at critical point and endpoints:

\(x\) \(f(x) = xe^{-x}\) Approximate
\(0\) \(0 \cdot e^0 = 0\) \(0\)
\(1\) \(1 \cdot e^{-1} = \frac{1}{e}\) \(\approx 0.368\)
\(3\) \(3 \cdot e^{-3} = \frac{3}{e^3}\) \(\approx 0.149\)

Answer:

  • Absolute maximum: \(f(1) = \frac{1}{e} \approx 0.368\)
  • Absolute minimum: \(f(0) = 0\)

Part 3: Complete Curve Sketching

Problem 9: Sketching a Rational Function (xxx)

Use the 6-step algorithm to sketch \(f(x) = \frac{x^2 - 4}{x}\).

  1. Domain and intercepts

  2. Critical points

  3. Inflection points

  4. Sign charts for \(f'\) and \(f''\)

  5. Asymptotes

  6. Complete sketch

Step 1: Domain and Intercepts

  • Domain: \(x \neq 0\)
  • \(y\)-intercept: None (0 not in domain)
  • \(x\)-intercepts: \(x^2 - 4 = 0\), so \(x = \pm 2\)

Step 2: Critical Points

Simplify: \(f(x) = \frac{x^2-4}{x} = x - \frac{4}{x}\)

\[f'(x) = 1 + \frac{4}{x^2}\]

Since \(\frac{4}{x^2} > 0\) for all \(x \neq 0\): \[f'(x) > 0 \text{ for all } x \neq 0\]

No critical points! (Always increasing on each piece of domain)

Step 3: Inflection Points

\[f''(x) = -\frac{8}{x^3}\]

Set \(f''(x) = 0\): No solution

But \(f''\) changes sign at \(x = 0\) (not in domain)

No inflection points in the domain

Step 4: Sign Charts

\(f'(x) = 1 + \frac{4}{x^2} > 0\) everywhere → Always increasing

\(f''(x) = -\frac{8}{x^3}\):

  • \(x < 0\): \(f''(x) > 0\) (concave up)
  • \(x > 0\): \(f''(x) < 0\) (concave down)

Step 5: Asymptotes

Vertical asymptote at \(x = 0\):

  • As \(x \to 0^-\): \(f(x) = x - \frac{4}{x} \to 0 - (-\infty) = +\infty\)
  • As \(x \to 0^+\): \(f(x) = x - \frac{4}{x} \to 0 - (+\infty) = -\infty\)

Oblique asymptote: As \(x \to \pm\infty\), \(f(x) \approx x\)

Line \(y = x\) is an oblique asymptote

Step 6: Complete Sketch

Key features:

  • \(x\)-intercepts at \((\pm 2, 0)\)
  • Vertical asymptote at \(x = 0\)
  • Oblique asymptote \(y = x\)
  • Increasing on \((-\infty, 0)\) and \((0, \infty)\)
  • Concave up on \((-\infty, 0)\), concave down on \((0, \infty)\)

Problem 10: Sketching a Polynomial (xxx)

Use the 6-step algorithm to sketch \(g(x) = x^4 - 4x^3 + 4x^2\).

Step 1: Domain and Intercepts

  • Domain: All real numbers
  • \(y\)-intercept: \(g(0) = 0\)
  • \(x\)-intercepts: \(x^4 - 4x^3 + 4x^2 = x^2(x^2 - 4x + 4) = x^2(x-2)^2 = 0\)
    • Solutions: \(x = 0\) (multiplicity 2), \(x = 2\) (multiplicity 2)

Step 2: Critical Points

\[g'(x) = 4x^3 - 12x^2 + 8x = 4x(x^2 - 3x + 2) = 4x(x-1)(x-2)\]

Critical points: \(x = 0, 1, 2\)

Second derivative test: \[g''(x) = 12x^2 - 24x + 8\]

  • \(g''(0) = 8 > 0\) → local min
  • \(g''(1) = 12 - 24 + 8 = -4 < 0\) → local max
  • \(g''(2) = 48 - 48 + 8 = 8 > 0\) → local min

Step 3: Inflection Points

\[g''(x) = 12x^2 - 24x + 8 = 4(3x^2 - 6x + 2) = 0\] \[3x^2 - 6x + 2 = 0\] \[x = \frac{6 \pm \sqrt{36 - 24}}{6} = \frac{6 \pm \sqrt{12}}{6} = \frac{6 \pm 2\sqrt{3}}{6} = 1 \pm \frac{\sqrt{3}}{3}\]

\(x \approx 0.423\) and \(x \approx 1.577\)

Step 4: Sign Charts

\(g'(x) = 4x(x-1)(x-2)\):

  • \(x < 0\): \((-)(-)(-) = -\) → decreasing
  • \(0 < x < 1\): \((+)(-)(-) = +\) → increasing
  • \(1 < x < 2\): \((+)(+)(-) = -\) → decreasing
  • \(x > 2\): \((+)(+)(+) = +\) → increasing

\(g''(x)\): Changes sign at \(x \approx 0.423\) and \(x \approx 1.577\)

Step 5: Asymptotic Behavior

No asymptotes (polynomial)

End behavior: As \(x \to \pm\infty\), \(g(x) \to +\infty\) (leading term \(x^4\))

Step 6: Key values

  • \(g(0) = 0\) (local min, \(x\)-intercept)
  • \(g(1) = 1 - 4 + 4 = 1\) (local max)
  • \(g(2) = 16 - 32 + 16 = 0\) (local min, \(x\)-intercept)

Problem 11: Challenging Rational Function (xxxx)

Sketch \(h(x) = \frac{x^2}{x^2 - 4}\) using the complete algorithm.

Step 1: Domain and Intercepts

  • Domain: \(x \neq \pm 2\) (denominator ≠ 0)
  • \(y\)-intercept: \(h(0) = 0\)
  • \(x\)-intercepts: \(x^2 = 0\), so \(x = 0\)

Step 2: Critical Points

Using quotient rule: \[h'(x) = \frac{2x(x^2-4) - x^2(2x)}{(x^2-4)^2} = \frac{2x^3 - 8x - 2x^3}{(x^2-4)^2} = \frac{-8x}{(x^2-4)^2}\]

Set \(h'(x) = 0\): \(-8x = 0\), so \(x = 0\)

Classification: \(h''(0)\) would be complicated, use first derivative test:

  • \(x < 0\): \(h'(x) > 0\) (increasing)
  • \(x > 0\): \(h'(x) < 0\) (decreasing)

\(x = 0\) is a local maximum with \(h(0) = 0\)

Step 3: Inflection Points

[Calculation would be complex; note that concavity analysis would require \(h''(x)\)]

Step 4: Sign Charts

\(h'(x) = \frac{-8x}{(x^2-4)^2}\):

  • Positive for \(x < 0\) (numerator positive, denominator always positive)
  • Negative for \(x > 0\)

Step 5: Asymptotes

Vertical asymptotes: \(x = \pm 2\)

Behavior near asymptotes:

  • As \(x \to 2^-\): denominator \(\to 0^-\), numerator \(\to 4\)\(h(x) \to -\infty\)
  • As \(x \to 2^+\): denominator \(\to 0^+\), numerator \(\to 4\)\(h(x) \to +\infty\)
  • As \(x \to -2^-\): \(h(x) \to +\infty\)
  • As \(x \to -2^+\): \(h(x) \to -\infty\)

Horizontal asymptote: \[\lim_{x \to \pm\infty} \frac{x^2}{x^2 - 4} = \lim_{x \to \pm\infty} \frac{1}{1 - \frac{4}{x^2}} = 1\]

Horizontal asymptote: \(y = 1\)

Step 6: [Students should sketch showing all features]

Part 4: Business Optimization

Problem 12: Profit Maximization (xx)

A company’s profit function (in thousands of euros) is: \[P(x) = -x^3 + 12x^2 - 36x + 50\]

where \(x\) is production level (in thousands of units).

  1. Find the production level that maximizes profit.

  2. What is the maximum profit?

  3. For what production levels is the company making a profit (i.e., \(P(x) > 0\))?

Part a: Production level for maximum profit

\[P'(x) = -3x^2 + 24x - 36 = -3(x^2 - 8x + 12) = -3(x-2)(x-6)\]

Critical points: \(x = 2\) and \(x = 6\)

Second derivative test: \[P''(x) = -6x + 24\]

  • \(P''(2) = -12 + 24 = 12 > 0\) → local minimum
  • \(P''(6) = -36 + 24 = -12 < 0\)local maximum

Production level: 6 thousand units (6000 units)

Part b: Maximum profit

\[P(6) = -(6)^3 + 12(6)^2 - 36(6) + 50\] \[= -216 + 432 - 216 + 50 = 50\]

Maximum profit: €50,000

Part c: Profit regions

This requires solving \(P(x) > 0\), which is complicated for a cubic. We can evaluate at key points:

  • \(P(0) = 50 > 0\)
  • \(P(2) = -8 + 48 - 72 + 50 = 18 > 0\)
  • \(P(6) = 50 > 0\)

Since the profit function starts positive and has local extrema at \(x=2\) (min) and \(x=6\) (max), we’d need to check when it crosses zero. For practical purposes, the company should operate near the maximum at \(x = 6\).

Problem 13: Cost Minimization (xxx)

The average cost per unit for a manufacturer is: \[\bar{C}(x) = 0.01x^2 - 0.6x + 13 + \frac{50}{x}\]

where \(x\) is the number of units produced (in hundreds).

  1. Find the production level that minimizes average cost.

  2. What is the minimum average cost?

  3. Verify that your answer is indeed a minimum.

Part a: Production level for minimum cost

\[\bar{C}'(x) = 0.02x - 0.6 - \frac{50}{x^2}\]

Set \(\bar{C}'(x) = 0\): \[0.02x - 0.6 - \frac{50}{x^2} = 0\]

Multiply by \(x^2\): \[0.02x^3 - 0.6x^2 - 50 = 0\]

Multiply by 50: \[x^3 - 30x^2 - 2500 = 0\]

This cubic has no rational roots and must be solved numerically (e.g., with a calculator).

\(x \approx 32.4\) hundred units

Part b: Minimum average cost

\[\bar{C}(32.4) = 0.01(32.4)^2 - 0.6(32.4) + 13 + \frac{50}{32.4}\] \[\approx 10.50 - 19.44 + 13 + 1.54 = 5.60\]

Minimum average cost: approximately €5.60 per unit

Part c: Verification

\[\bar{C}''(x) = 0.02 + \frac{100}{x^3}\]

Since both terms are positive for \(x > 0\): \[\bar{C}''(32.4) = 0.02 + \frac{100}{34012} \approx 0.023 > 0\]

Confirmed: minimum

Problem 14: Revenue Maximization (xx)

A company can sell \(x\) thousand units at a price of \(p = 100 - 2x\) euros per unit.

  1. Write the revenue function \(R(x)\).

  2. Find the production level that maximizes revenue.

  3. What is the maximum revenue?

  4. What price should be charged to achieve maximum revenue?

Part a: Revenue function

\[R(x) = x \cdot p = x(100 - 2x) = 100x - 2x^2\]

(Revenue = quantity × price)

Part b: Production level for maximum revenue

\[R'(x) = 100 - 4x\]

Set \(R'(x) = 0\): \[100 - 4x = 0\] \[x = 25\]

Verify: \(R''(x) = -4 < 0\) → maximum ✓

Production level: 25 thousand units

Part c: Maximum revenue

\[R(25) = 100(25) - 2(25)^2 = 2500 - 1250 = 1250\]

Maximum revenue: €1,250,000

Part d: Price for maximum revenue

\[p = 100 - 2(25) = 100 - 50 = 50\]

Price: €50 per unit

Problem 15: Optimization with Constraint (xxxx)

A farmer has 100 meters of fencing and wants to enclose a rectangular area next to a river (so fencing is needed on only three sides).

  1. Express the area \(A\) as a function of the width \(x\) perpendicular to the river.

  2. What dimensions maximize the enclosed area?

  3. What is the maximum area?

Part a: Area function

Let \(x\) = width perpendicular to river, \(y\) = length parallel to river

Fencing constraint: \(2x + y = 100\) (two widths + one length)

So: \(y = 100 - 2x\)

Area: \(A(x) = xy = x(100 - 2x) = 100x - 2x^2\)

Part b: Dimensions for maximum area

\[A'(x) = 100 - 4x\]

Set \(A'(x) = 0\): \[100 - 4x = 0\] \[x = 25\]

Then: \(y = 100 - 2(25) = 50\)

Verify: \(A''(x) = -4 < 0\) → maximum ✓

Dimensions: 25 m × 50 m

Part c: Maximum area

\[A(25) = 100(25) - 2(25)^2 = 2500 - 1250 = 1250\]

Maximum area: 1250 m²

Problem 16: Inventory Optimization (xxxx)

A store sells 1000 units per year of a certain product. The ordering cost is €20 per order, and the holding cost is €5 per unit per year.

The Economic Order Quantity (EOQ) model gives the total annual cost as: \[C(x) = \frac{1000 \cdot 20}{x} + \frac{x \cdot 5}{2} = \frac{20000}{x} + 2.5x\]

where \(x\) is the order size.

  1. Find the order size that minimizes total cost.

  2. What is the minimum total annual cost?

  3. How many orders should be placed per year?

Part a: Optimal order size

\[C'(x) = -\frac{20000}{x^2} + 2.5\]

Set \(C'(x) = 0\): \[2.5 = \frac{20000}{x^2}\] \[2.5x^2 = 20000\] \[x^2 = 8000\] \[x = \sqrt{8000} = 20\sqrt{20} = 20 \cdot 2\sqrt{5} = 40\sqrt{5} \approx 89.44\]

Verify: \(C''(x) = \frac{40000}{x^3} > 0\) for \(x > 0\) → minimum ✓

Optimal order size: approximately 89 or 90 units

Part b: Minimum total cost

\[C(40\sqrt{5}) = \frac{20000}{40\sqrt{5}} + 2.5(40\sqrt{5})\] \[= \frac{500}{\sqrt{5}} + 100\sqrt{5} = \frac{500\sqrt{5}}{5} + 100\sqrt{5}\] \[= 100\sqrt{5} + 100\sqrt{5} = 200\sqrt{5} \approx 447.21\]

Minimum annual cost: approximately €447

Part c: Number of orders per year

\[\text{Number of orders} = \frac{\text{Annual demand}}{\text{Order size}} = \frac{1000}{40\sqrt{5}} = \frac{25}{\sqrt{5}} = 5\sqrt{5} \approx 11.18\]

Approximately 11 orders per year

Important:

  1. Always verify critical points using derivative tests
  2. Don’t forget to check endpoints when finding global extrema
  3. The 6-step algorithm provides a systematic approach to curve sketching
  4. Business problems require careful setup of objective functions and constraints
  5. Both first and second derivatives provide essential information about function behavior

Exam Preparation:

  • Practice the curve sketching algorithm until it becomes automatic
  • Master both derivative tests and know when to use each
  • Always verify that your critical points are actually maxima or minima!