2
$\begingroup$

I have this function which has 4 turning points:

$$f(x)=18m^4 x+42m^3 x^2-54m^2 x^3-42 m x^4+36x^5$$ f(x)==18m^4 x+42m^3 x^2-54m^2 x^3-42 m x^4+36x^5

However, I can't seem to find out how to use the same function to find the nature of the points. Am I missing something? I'm quite new to Mathematica.

$\endgroup$
2
  • $\begingroup$ What range of x and m are you interested in? What are the four turning points you found? Can you show the code you've used so far? $\endgroup$
    – Chris K
    Apr 11 at 20:45
  • $\begingroup$ x is just an arbetrary variable, i apoligise for not specifying the value of m, it is 0.89003. The turning points are at {{x -> -0.693447}, {x -> -0.151408}, {x -> 0.514972}, {x -> 1.16058}} , the code i have currently is : "m = 0.89003 b[x_] := 18 m^4 x + 42 m^3 x^2 - 54 m^2 x^3 - 42 m x^4 + 36 x^5 / Solve[b'[x] == 0] // N / {{x -> -0.693447}, {x -> -0.151408}, {x -> 0.514972}, {x -> 1.16058}}" $\endgroup$
    – Momo Mori
    Apr 11 at 21:02

2 Answers 2

4
$\begingroup$
$Version

(* "13.2.1 for Mac OS X ARM (64-bit) (January 27, 2023)" *)

Clear["Global`*"]

f[m_, x_] := 18 m^4 x + 42 m^3 x^2 - 54 m^2 x^3 - 42 m x^4 + 36 x^5

max[m_] = Solve[{D[f[m, x], x] == 0, D[f[m, x], {x, 2}] < 0}, x, Reals];

min[m_] = Solve[{D[f[m, x], x] == 0, D[f[m, x], {x, 2}] > 0}, x, Reals];

With[{m = 0.89003},
 Plot[f[m, x], {x, -1, 1.5},
  Epilog -> {AbsolutePointSize[6],
    Red, Tooltip[Point[{x, f[m, x]}], {x, f[m, x]}] /. max[m],
    Blue, Tooltip[Point[{x, f[m, x]}], {x, f[m, x]}] /. min[m]},
  PlotLegends -> Placed[
    PointLegend[{Red, Blue}, {"maxima", "minima"}, LegendMarkerSize -> 13],
    {0.75, 0.75}]]]

enter image description here

$\endgroup$
2
  • $\begingroup$ For generality you should probably add something like indet[m_] = Solve[{D[f[m, x], x] == 0, D[f[m, x], {x, 2}] == 0}, x, Reals]; for the critical points that may or may not be extremal. $\endgroup$ Apr 12 at 16:02
  • $\begingroup$ @MichaelSeifert - I considered that, but my guess at what was meant by “turning points” did not include inflection points, i.e., where the curve is flat. $\endgroup$
    – Bob Hanlon
    Apr 12 at 16:06
3
$\begingroup$

If by "turning points" you mean the values of $x$ where $\frac{\partial f(x)}{\partial x}=0$, then the following will get you what you want:

f[x_] := 18 m^4 x + 42 m^3 x^2 - 54 m^2 x^3 - 42 m x^4 + 36 x^5
Reduce[D[f[x], x] == 0, x] // N
(* x == -0.779128 m || x == -0.170115 m || x == 0.578601 m || x == 1.30398 m *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.