Piecewise Function with 4 eqts graphing incorrectly

Lillian shared this question 4 years ago


For a maths assignment, I needed to create two piecewise functions in the shape of a wineglass that adhered to certain criteria.

However, one of my piecewise functions doesn't connect and I cannot figure out how to stop it from creating a voided area between two points. While I can graph the piecewise on a graphics calculator easily I cannot graph it on GeoGebra. The piecewise function contains 4 equations, of which two overlap the same area on the x-axis. It is currently this:

r_2(x) = If(x < 1.15, If(0 < x < 1.15, 4x² - 5), If(x < 7.11, If(1.15 < x < 7.11, sin(2x) - 0.5), If(x < 6, If(0 < x < 7.11, 1.5sqrt(x - 7)), If(0 < x < 19, -1.5sqrt(x - 7)))))

These are the individual eqts for each function with their correct domains

  • f_2(x) = If(0 < x < 1.15, 4x² - 5)
  • p_1(x) = If(1.15 < x < 7.11, sin(2x) - 0.5)
  • q_2(x) = If(0 < x < 19, -1.5sqrt(x - 7))
  • h_2(x) = If(0 < x < 7.11, 1.5sqrt(x - 7))

When graphed it does not connect the two SQRT eqts. to the sin eqt. Is there a way to fix this? or a way to re-write the command so that it does not "cut out" sections of the equations?

Comments (2)


The reason is that you are trying to define a function with three outputs for one x on that h_2 part. It is like trying to plot y^2 = x with a single function f(x) it will never work.

To solve this you have either to modify your sine in order to have no overlapping definition areas or you have to use a parametric function/curve.


the points need adjustment

Files: foro.ggb
© 2023 International GeoGebra Institute