Pdf of variable as combination of two random variables with exponential distribution

If $X$ and $Y$ are independent and exponentially distributed, which is the pdf of $Z$? Where $Z$ is given by $$Z = \frac{X}{1+Y}$$

I read answer to this post: $X,Y$ are independent exponentially distributed then what is the distribution of $X/(1+Y)$

Why the following calculations to solve the proposed questions lead to different results, compared with the answer given in the thread linked above? $$p(z) = \int_0^{\infty} e^{-z(1+y)*\lambda_1} e^{-y*\lambda_2} dy = \frac{\lambda_2^2 e^{-z \lambda_1}}{(\lambda_1+\lambda_2 *z)}$$

I don't understand the difference or my mistake.

[EDIT] The other thread linked above didn't fully answer to my question because I would calculate the z pdf without walking through the P(z) and then differentiate.

Papoulis's book "Probability, random variables and stochastic processes" section 6 didn't use the method proposed and in contrary achieves the z's pdf as I tried in my calculations.

I achieved that results with Mathematica as follows

ClearAll[ff, Ctr, Cjr, z, x, y]
ff = Assuming[Ctr > 0 &&  Cjr > 0 && z > 0, Integrate[(1/Ctr*Cjr) * Exp[-(z (1 + y))/Ctr] Exp[-y/Cjr], {y,
0, \[Infinity]}]]


In other words, I'm asking another way to calculate the z's pdf.

Hopefully it helps.

• From where did you get $\lambda_2^2$? I mean the squared! – Karl Apr 11 '15 at 17:12
• Duplicate of: math.stackexchange.com/questions/1191111/… – wolfies Apr 11 '15 at 19:09
• I have edited in order to explain it is not the same question – smtux Apr 11 '15 at 23:22
• "Why the following calculations to solve the proposed questions lead to different results" Where does the first equal sign in the identity just after this come from? (The second equal sign is squarely wrong, but this could probably be repaired.) Once this is explained, you might want to note that the method explained in the other post is almost the simplest (the very simplest being to compute P(X>z(1+Y)) instad of P(X<z(1+Y))...). – Did Apr 12 '15 at 8:02
• Hello, first thanks to answering. The first equal sign should be the pdf definition. Why the second is wrong? (at the end of the day it's my question). Which is the reason behind it is easier calculate P(x>z(1+y)) instead of P(x<z(1+y)). – smtux Apr 12 '15 at 8:24