How to show just part of a line

Simon shared this question 5 years ago
Answered

When I draw a line base on a function, I can't figure out how to just show part of the line. Eg. I only want to show where Y and X > 0.


Please help. Thnx.

Best Answer
photo

the proposed command is OK for the condition x> 0. If x and as well y have to be positive a supplementery condition for y is needed (it is not needed for y=3x-2 but it is for e.g. y=3x+2).


A solution for that line is f(x)=3x+2 and g(x)=If[f>0 && 0<x<=∞, f].

In both answers you'll notice that you have to cover the line by a function, in order to define the conditions.

c561be4b6b3d7781990946f98cdc45da

Comments (4)

photo
1

  1. %eg. line: y=3x-2
  2. f(x) = If[0 < x ≤ ∞, 3x-2]

photo
3

the proposed command is OK for the condition x> 0. If x and as well y have to be positive a supplementery condition for y is needed (it is not needed for y=3x-2 but it is for e.g. y=3x+2).


A solution for that line is f(x)=3x+2 and g(x)=If[f>0 && 0<x<=∞, f].

In both answers you'll notice that you have to cover the line by a function, in order to define the conditions.

c561be4b6b3d7781990946f98cdc45da

photo
1

Or also a simpler g(x)=If[f>0 && x>0, f]

(three keystrokes less - for lazy people :D )

photo
2

chi sa che un giorno a Linz una persona riuscira a creare valore piu largo che infinito...

© 2021 International GeoGebra Institute