Graphical minimization

Calculus Level 4

Find the value of k k which minimizes 0 4 x ( 4 x ) k d x \int_{0}^{4} |x(4 - x) - k| \, dx


The answer is 3.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Chew-Seong Cheong
Nov 25, 2020

I ( k ) = 0 4 x ( 4 x ) k d x Let u = 2 x d u = d x = 2 2 ( 2 u ) ( 2 + u ) k d u Since the integrand = 2 0 2 4 k u 2 d u is an even function \begin{aligned} I(k) & = \int_0^4 |x(4-x)-k|\ dx & \small \blue{\text{Let }u=2-x \implies du = - dx} \\ & = \int_{-2}^2 |(2-u)(2+u) - k | \ du & \small \blue{\text{Since the integrand}} \\ & = 2 \int_0^2 |4-k-u^2 | \ du & \small \blue{\text{is an even function}} \end{aligned}

For k 0 k \le 0 ,

I ( k 0 ) = 2 0 2 ( 4 k u 2 ) d u = 2 [ 4 u k u u 3 3 ] 0 2 = 32 3 4 k \begin{aligned} I(k\le 0) & = 2 \int_0^2 (4-k-u^2) \ du = 2 \left[4u-ku-\frac {u^3}3 \right]_0^2 = \frac {32}3 - 4k \end{aligned}

min ( I ( k 0 ) ) = 32 3 \implies \min(I(k \le0)) = \dfrac {32}3 , when k = 0 k=0 .

For 0 < k < 4 0 < k <4 ,

I ( 0 < k < 4 ) = 2 0 2 ( 4 k u 2 ) d u = 2 0 4 k ( 4 k u 2 ) d u + 2 4 k 2 ( u 2 4 + k ) d u = 8 3 ( 4 k ) 3 2 + 16 3 4 ( 4 k ) \begin{aligned} I(0<k<4) & = 2 \int_0^2 (4-k-u^2) \ du \\ & = 2 \int_0^{\sqrt{4-k}} (4-k-u^2) \ du + 2 \int_{\sqrt{4-k}}^2 (u^2 - 4+ k) \ du \\ & = \frac 83(4-k)^\frac 32 + \frac {16}3 - 4(4-k) \end{aligned}

To find min ( I ( 0 < k < 4 ) ) \min(I(0<k<4)) , d I ( k ) d k = 4 4 k + 4 \dfrac {dI(k)}{dk} = - 4\sqrt{4-k} + 4 . Putting d I ( k ) d k = 0 \dfrac {dI(k)}{dk} = 0 , 4 k = 1 k = 3 \implies \sqrt{4-k} = 1 \implies k = 3 . Therefore min ( I ( 0 < k < 4 ) ) = I ( 3 ) = 4 \min (I(0<k<4)) = I(3) = 4 .

For k 4 k \ge 4 ,

I ( k 4 ) = 2 0 2 ( u 2 4 + k ) d u = 2 [ u 3 3 4 u + k u ] 0 2 = 4 k 32 3 \begin{aligned} I(k\ge 4) & = 2 \int_0^2 (u^2-4+k) \ du = 2 \left[\frac {u^3}3 -4u + ku \right]_0^2 = 4k - \frac {32}3 \end{aligned}

min ( I ( k 4 ) ) = 16 3 \implies \min(I(k \ge 4)) = \dfrac {16}3 .

Therefore min ( I ( k ) ) = 4 \min(I(k)) = 4 , when k = 3 k = \boxed 3 .

Ugh, I had the idea of substituting x to simplify the computations but instead of 2-u I substituted for u-2. I quickly dropped the idea and brute forced the solution out.

Halim Amran - 6 months, 2 weeks ago
Shreyas Pandit
Nov 24, 2020

We are going to use the following formula without proof. Searching "Leibniz integral rule" will let you find a proof of this result online.

Let I ( α ) = a ( α ) b ( α ) f ( x , α ) d x I(\alpha) = \int_{a(\alpha)}^{b(\alpha)}{f(x, \alpha) dx} .

Then

d I d α = f ( b , α ) d b d α f ( a , α ) d a d α + a ( α ) b ( α ) f ( x , α ) α d x \frac{dI}{d \alpha} = f(b, \alpha)\frac{db}{d \alpha} - f(a, \alpha) \frac{da}{d \alpha} + \int_{a(\alpha)}^{b(\alpha)}{ \frac{\partial f(x, \alpha)}{\partial \alpha} dx } .

Furthermore, it is clear that the required value of k k is between 0 and 4 (this can be seen graphically).

For 0 k 4 0 \leq k \leq 4 , the line y = k y=k intersects the parabola y = x ( 4 x ) y=x(4-x) at x = 2 ± 4 k x = 2 \pm \sqrt{4-k} . Between these two roots, the parabola is above the line - and thus x ( 4 x ) k 0 x(4-x) - k \geq 0 , and elsewhere in [ 0 , 4 ] [0, 4] we have x ( 4 x ) k 0 x(4-x) - k \leq 0 . Thus,

F ( k ) = 2 4 k 2 + 4 k ( x ( 4 x ) k ) d x + 0 2 4 k ( k x ( 4 x ) ) d x + 2 + 4 k 4 ( k x ( 4 x ) ) d x . F(k) = \int_{2-\sqrt{4-k}}^{2+\sqrt{4-k}}{(x(4-x) - k) \, dx} + \int_{0}^{2-\sqrt{4-k}}{(k-x(4-x)) \, dx} + \int_{2+\sqrt{4-k}}^{4}{(k-x(4-x)) \, dx}.

Using the above result,

d F d k = 2 4 k 2 + 4 k d x + 0 2 4 k d x + 2 + 4 k 4 d x \frac{dF}{dk} = -\int_{2-\sqrt{4-k}}^{2+\sqrt{4-k}}{dx} + \int_{0}^{2-\sqrt{4-k}}{dx} + \int_{2+\sqrt{4-k}}^{4}{dx} .

Setting this equal to 0 0 ,

4 = 4 4 k 4 = 4 \sqrt{4-k} so k = 3 k = 3

thank you for the solution but shouldn't the upper limit of the second integral part in F(k) be 2 4 k 2-\sqrt{4-k} ?

Mehdi K. - 6 months, 2 weeks ago

Log in to reply

Yep - sorry about that! I've now corrected it.

Shreyas Pandit - 6 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...