ylang = (50 - 10  x) (10 + 10  x)

(*ytous müügisumma hinda tõstes*)

ytous = (50 + 10  x) (10 - x)

Plot[{ylang, ytous}, {x, 0, 5}, 
      PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 0]}]

tullang = Simplify[D[ylang, x]]

x = 2;  ylang

tultous = Simplify[D[ytous, x]]

x = 2.5; ytous