TransWikia.com

Plot involving an implicit function

Mathematica Asked by capadocia on December 11, 2020

I’m trying to make a plot that depends on an implicit function. This example illustrates the problem: plot $c=2l +n$ in the $c times l$ axes, where $n$ is implicitly determined by $n^5+ 2n = c^2$. Any ideas on how to do it?

3 Answers

Clear["Global`*"]

eqn = Eliminate[{c == 2*l + n, n^5 + 2*n == c^2}, n] // Simplify

(* c (2 + c^4 + 40 c^2 l^2 + 80 l^4) == 
 10 c^4 l + c^2 (1 + 80 l^3) + 4 (l + 8 l^5) *)

ContourPlot[
 Evaluate@eqn, {c, -10, 10}, {l, -10, 10},
 FrameLabel -> (Style[#, 14, Bold] & /@ {"c", "l"})]

enter image description here

Correct answer by Bob Hanlon on December 11, 2020

As long as your condition is a polynomial you could use Root

 Plot[(c-n)/2 /.{n -> Root[#^5+2*#-c^2,1]},{c,-5,5},AxesLabel->{"c","l"}]

enter image description here

Answered by Hausdorff on December 11, 2020

spacecurve = 
  ContourPlot3D[
   c == 2*l + n, {c, -10, 10}, {l, -10, 10}, {n, -10, 10}, 
   MeshFunctions -> Function[{c, l, n}, n^5 + 2*n - c^2], 
   Mesh -> {{0}}, Mesh -> Red, BoundaryStyle -> None, 
   ContourStyle -> None, Boxed -> False, Axes -> False];
Graphics[First@spacecurve /. {c_Real, l_Real, n_Real} -> {c, l}]

Or

reg = ImplicitRegion[{c == 2 l + n , n^5 + 2 n == c^2}, {c, l, n}];
eqn = Resolve[Exists[n, Element[{c, l, n}, reg]], Reals]
ContourPlot[eqn // Evaluate, {c, -10, 10}, {l, -10, 10}]

Answered by cvgmt on December 11, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP