Why is this plot drawn so poorly? Can I draw a better image?

The function y = 4 - 4 ( (1 - x^4)^(1/4) ) is defined on the interval (-1, 1) but as you can see on the image rendered with Mathematika 12 the ends of the curve don't touch y = 4 line, however they must do. How do I get a better drawing?

Plot[{{4 - 4 ((1 - x^4)^(1/4))}, {4}}, {x, -1, 1},
AspectRatio -> Automatic, PlotRange -> Full]

• You can always enlarge the interval, say from -1.5 to 1.5. Commented Feb 12, 2021 at 19:31
• Please post the code you used to make this plot Commented Feb 12, 2021 at 19:33
• You can use the PlotRange option. Commented Feb 12, 2021 at 19:33
• Plot[{4,4-4((1-x^4)^(1/4))},{x,-1,1},PlotRange->{0,4},PlotPoints->1000]
– Bill
Commented Feb 12, 2021 at 19:34
• Similar problem: mathematica.stackexchange.com/questions/173397/… Commented Feb 12, 2021 at 19:45

By default, there is a very slight offset from the boundary in the sample points used.

Plot[{4 - 4 ((1 - x^4)^(1/4)), 4}, {x, -1, 1},
Method -> "BoundaryOffset" -> False, AspectRatio -> Automatic]

• It's funny, if I set {x, -1.5, 1.5} your method stops working. Commented Feb 12, 2021 at 21:19
• @yarchik Seems predictable to me....Discrete sampling has its drawbacks. I think one would stick to the domain {x, -1, 1} since experience teaches going outside like {x, -1.5, 1.5} is a mistake in functions like Sqrt[] (1), 2)) and other even roots; and the problem with dancing on the edge of the domain is somewhat obvious after a little thought. Commented Feb 13, 2021 at 2:11

How about a ContourPlot ?

ContourPlot[
{
y == 4
, y == 4 - 4 ((1 - x^4)^(1/4))
}
, {x, -1, 1}
, {y, -1, 5}
, PlotPoints -> 200
, AspectRatio -> GoldenRatio
, GridLines -> Automatic
]