# How to extract maximum value coordinates from ParametricPlot of function

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?

• 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. Jul 16, 2018 at 17:53

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.

## 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}}} *)

• Thanks. How we can use the range of x, to get maxima from function.
– user38336
Jul 16, 2018 at 18:27
• 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. Jul 16, 2018 at 18:32

Ypu can also use PlotRange as a function:

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

Max /@ PlotRange @ plot


{1., 2.}