# How to solve this math problem regarding Histogram matching?

Please help solve the problem in the picture. I am confused due to the piecewise nature of the density functions. If it was a simple curved PDF, I would simply integrate over full range and use the single CDF expressions. But, for this piecewise case, in each section I will have different expressions.

P.S.--This is NOT a homework question. It is from a past year exam.

• The PDFs are NOT discrete, just defined as sections. They are continuous and easy to ingrate. You just have to do it piecewise – Hilmar Jan 22 at 13:13
• I apologize. I misspoke. I knew it was continuous, I meant to say one simple curve. I have edited the post. Anyway, how do I solve for this piecewise case? I have to find expressions of CDF with respect to 'r' and 'z'. But, in each section i will have different expressions. – fac120 Jan 22 at 13:28
• A piecewise problem typically has a piecewise solution: solve for each section individually and than splice them together. – Hilmar Jan 22 at 14:54
• For example the CDF of $\int p_r(r) = 4/5\cdot r - 1/5 \cdot r^2, 0 < r < 1$ and $3/5 + 2/5(r-1), 1 < r < 2$ – Hilmar Jan 22 at 18:07
• I can find the cdf for each section. My question is about histogram matching. Do I also do the histogram matching for each section separately ? Like, do I compute one transformation for interval 0<r,z<1 and another different expression for 1< r,z <2 ? – fac120 Jan 23 at 19:10