7

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?
y = 4 - 4 ( (1 - x^4)^(1/4) )

Plot[{{4 - 4 ((1 - x^4)^(1/4))}, {4}}, {x, -1, 1}, 
 AspectRatio -> Automatic, PlotRange -> Full]
Simpleton Jack
  • 3,013
  • 3
  • 12
  • 11

2 Answers2

17

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]
Michael E2
  • 235,386
  • 17
  • 334
  • 747
  • It's funny, if I set {x, -1.5, 1.5} your method stops working. – yarchik Feb 12 '21 at 21:19
  • 1
    @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. – Michael E2 Feb 13 '21 at 02:11
8

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
  ]
Conor
  • 7,449
  • 1
  • 22
  • 46