1
$\begingroup$

I have a ParametricPlot

ParametricPlot[{Sin[x], 2 Cos[x]}, {x, 0, 2 π}]

How to know the maximum value on Y-axix and X-axis?

$\endgroup$
1
  • $\begingroup$ Do you really need to extract the information from the ParametricPlot or is it OK to extract it from the equation? Please edit your question to clarify. Learn about good questions here. $\endgroup$
    – rhermans
    Jul 16, 2018 at 17:53

3 Answers 3

2
$\begingroup$
x /. Solve[D[Sin[x], x]==0, x]

will find x, then just plug it into Sin[x]. Of course this will give either a maximum or minimum. Select the maximum.

Or use the second-derivative text from calculus.

$\endgroup$
0
$\begingroup$

From Plot

To extract from the plot itself you can do

pplt = ParametricPlot[{Sin[x], 2 Cos[x]}, {x, 0, 2 π}];

Max /@ (PlotRange /. Options[pplt])
(* {1., 2.} *)

From equation

First /@ Thread@Maximize[{Sin[x], 2 Cos[x]}, x]

(* {1, 2} *)

or with constraints and maxima positions

Maximize[{#, 0 < x < 2 π}, x] & /@ {Sin[x], 2 Cos[x]}

(* {{1, {x -> π/2}}, {2, {x -> 0}}} *)
$\endgroup$
2
  • $\begingroup$ Thanks. How we can use the range of x, to get maxima from function. $\endgroup$
    – user38336
    Jul 16, 2018 at 18:27
  • $\begingroup$ You can specify constraints in Maximize. If your question requieres clarification, please edit your question. But if you have a follow-up question, then you should ask a new question. $\endgroup$
    – rhermans
    Jul 16, 2018 at 18:32
0
$\begingroup$

Ypu can also use PlotRange as a function:

plot = ParametricPlot[{Sin[x], 2 Cos[x]}, {x, 0, 2 Pi}]

Max /@ PlotRange @ plot

 {1., 2.}

$\endgroup$

Your Answer

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