I want to reproduce these plots for further development in Mathematica:
To do so I defined the functions A and B as following
A[x_ /; 0 < x < 200] := Piecewise[{{65, 0 < x < 100}, {110, 100 < x < 200}}]
B[x_ /; 0 < x < 200] := Piecewise[{{40, 0 < x < 100}, {90 , 100 < x < 200}}]
Now when I plot their sum the domain is fixed and the ranges are added together.
In the graph above the domains of A and B are added. Then in a try in each step of the new domain the minimum of A or B or A+b is returned. How one can make this graph below from A and B?
EDIT: The domain of the functions are not necessarily unique. Take this example:
A[x_ /; 0 < x < 200] := Piecewise[{{65, 0 < x < 100}, {110, 100 < x < 200}}]
B[x_ /; 0 < x < 300] := Piecewise[{{40, 0 < x < 170}, {90 , 170< x < 300}}]