You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用Wolfram Mathematica求区间内函数绝对最值?含图像与二阶导数对比

Hey there! Let's walk through exactly how to find the absolute maximum and minimum of ( f(x) = 3x^{2/3} - 2x + 1 ) on the interval ([-1, 8]) using Wolfram Mathematica. We'll also use graphs and the second derivative test to double-check our results—here's a step-by-step guide:

Step 1: Define the Function and Interval

First, set up your function and target interval in Mathematica:

f[x_] = 3 x^(2/3) - 2 x + 1;
interval = {-1, 8};
Step 2: Identify Critical Points

Absolute extrema (max/min) can only occur at interval endpoints or critical points (where the first derivative is 0 or undefined). Let's find these points:

Compute the first derivative

f'[x]

This returns ( \frac{2}{x^{1/3}} - 2 ).

Find where the derivative equals 0

Solve[f'[x] == 0, x]

Mathematica will output the solution ( x = 1 ).

Check where the derivative is undefined

Looking at ( f'(x) ), dividing by ( x^{1/3} ) means the derivative is undefined at ( x = 0 ). So our critical points are ( x = 0 ) and ( x = 1 ).

Step 3: Calculate Function Values at Key Points

Evaluate ( f(x) ) at the interval endpoints and critical points to find absolute extrema:

f[-1]  (* Output: 6 *)
f[0]   (* Output: 1 *)
f[1]   (* Output: 2 *)
f[8]   (* Output: -3 *)

From these results:

  • The absolute maximum is 6, occurring at ( x = -1 )
  • The absolute minimum is -3, occurring at ( x = 8 )
Step 4: Visualize the Function to Confirm

A graph helps intuitively verify our findings. Plot the function and mark key points with red dots:

Plot[f[x], {x, -1, 8}, 
 Epilog -> {
   Red, PointSize[Large],
   Point[{-1, f[-1]}],  (* Absolute max *)
   Point[{0, f[0]}],    (* Local min *)
   Point[{1, f[1]}],    (* Local max *)
   Point[{8, f[8]}]     (* Absolute min *)
 },
 PlotLabel -> "f(x) = 3x^(2/3) - 2x + 1 on [-1, 8]",
 AxesLabel -> {"x", "f(x)"},
 GridLines -> Automatic
]

The graph will show the function's trend: it decreases from ( x=-1 ) to ( x=0 ), rises to ( x=1 ), then drops all the way to ( x=8 )—confirming our max/min values.

Step 5: Use the Second Derivative Test for Local Extrema

We can use the second derivative to confirm the nature of our critical points:

f''[x]

This returns ( -\frac{2}{3 x^{4/3}} ).

  • For ( x = 1 ): ( f''(1) = -\frac{2}{3} < 0 ), meaning the function is concave down here—so ( x=1 ) is a local maximum.
  • For ( x = 0 ): The second derivative is undefined, so we check the first derivative sign: left of 0, ( f'(x) < 0 ); right of 0, ( f'(x) > 0 )—confirming ( x=0 ) is a local minimum.

Neither local extremum beats the interval endpoints for absolute max/min, which aligns with our earlier calculations.


内容的提问来源于stack exchange,提问作者Robbie

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:30:16