-1

I don't have the equation of the curve. The curve has a maxima and a minima as the following fig. How to plot such smooth graph using tex. Please suggest. Is it possible to suggest an equation of the curve have the same structure? How to get y such that y passing through (8,0) and (0,5) has a mimima at suppose (2, 4) and maxima at (6, 8)

enter image description here

Edit: enter image description here

Curve of y=-(x+1)(x-2)(x-3)

user1942348
  • 3,871
  • 3
    Cubics look like that...you should be able to fit a cubic to the roots or the critical points. – lulu Jul 24 '23 at 12:07
  • Please suggest an equation,,, (x + 1)(x -2)(x - 3) is not of the above shape.. – user1942348 Jul 24 '23 at 12:16
  • Clearly the lead coefficient has to be negative. Just multiply your form by $-1$. Of course, if you have points (like the critical points) that you want to fit, you'll have to adjust the coefficients. – lulu Jul 24 '23 at 12:20
  • Thanks for suggesting that the lead coefficient has to be negative... But getting a shape like this is very difficult.. Is there any option to plot instead? – user1942348 Jul 24 '23 at 12:25
  • 2
    Please be specific. The function you suggested, multiplied by $-1$, has the shape you sketched. Are there specific points you want it to go through? Your question is very vague. The specific cubic you wrote down goes through $(0, -6)$ so if you want it to go through $(0,8)$ just add $14$. Beyond that...well, we can't guess what requirements you have. – lulu Jul 24 '23 at 12:28
  • Do you know the coordinates of the two extrema? This will be very helpful information. – Veselin Dimov Jul 24 '23 at 12:30
  • Please edit your post to include all the details you wanted, and to include your own efforts. And...did you mean $(8,0)$? Your picture shows $(0,8)$. The graph you drew clearly does not pass through $(0,3)$. – lulu Jul 24 '23 at 12:46
  • @lulu I have edited with a detailed description – user1942348 Jul 24 '23 at 12:56
  • 1
    You have been given a great deal of information, please try to work on this yourself. Note that you probably can't fit a cubic with exactly those properties, but you can come close. The unique cubic passing through those four points is $-\frac {13 x^3}{96} + \frac {4 x^2}3 - \frac {21 x}8 + 5$ but the critical points of that are slightly off the desired values. – lulu Jul 24 '23 at 13:06
  • 1
    WA has an interpolating polynomial calculator, which is how I found the cubic I wrote, but you can use it to try to better fit the curve you want (you'll need degree $>3$ to get much better). – lulu Jul 24 '23 at 13:07
  • Excellent help... I need exactly this ..Thanks – user1942348 Jul 24 '23 at 13:12
  • See https://en.wikipedia.org/wiki/Birkhoff_interpolation – lhf Jul 24 '23 at 14:18

1 Answers1

1

Of course to plot something it must ... be something. That is to say, in this case, it must be some function.

But given the constraints, you can pick anything you want, as long as it meets the constraints. Judging from the picture, the main constraints that I see represented are:

  • It goes to infinity as $x\to-\infty$ and it goes to $-\infty$ as $x\to\infty$.
  • It has a local minimum and maximum.
  • It is "smooth" (continuous derivatives of all orders, let's say).

So $-x(x-1)(x+1)$ should suffice, which you can easily plot in almost any mathematical plotting software.

If the graph is supposed to fit in some kind of a box with the origin in the lower-left corner as it seems it might be in the picture, then you can shift and scale the graph until it fits. To scale it, use

$$ -rx(x-1)(x+1) $$

for any $r$ you like, to shrink or expand it vertically. To shrink or expand horizontally

$$-r(sx)(sx-1)(sx+1)$$

To translate this up and right by the vector $\langle h,k\rangle$, use

$$-r(s[x-h])(s[x-h]-1)(s[x-h]+1) + k$$

So you can play with the parameters $r,s,h,k$ until it fits where you want it.

Addem
  • 5,656