Following this question:Definition of $\text{Exp}(\theta,1)$ distribution.
The pdf of $X$ is given as $f(x,\theta)=e^{-(x-\theta)}$, $x>\theta$.
My question is, what is the expectation of $X$?
My work is that $$ E[X]=e^\theta\int_\theta^\infty xe^{-x}dx=-e^\theta[\theta e^{-\theta}- e^{-\theta}]=1-\theta. $$
It is much easier to recognize that $X$ is a location-transformed exponential distribution with location parameter $\theta$. In other words, $Y = X - \theta$ is exponentially distributed with mean $1$. How do we know this? Well, because if $X$ has density $f_X(x) = e^{-(x-\theta)}$, then $Y = X - \theta$ will have density $$f_Y(y) = f_X(y+\theta) = e^{-(y+\theta-\theta)} = e^{-y}.$$ So we have $$\operatorname{E}[X] = \operatorname{E}[Y + \theta] = \operatorname{E}[Y] + \theta = 1 + \theta.$$ In fact, this reasoning easily generalizes to any location-scale transformation of a random variable: if $X$ has mean $\mu$ and variance $\sigma^2$, then $Y = aX + b$ will have mean $a \mu + b$ and variance $a^2 \sigma^2$.
If we must do the integral calculation, $$\begin{align} \operatorname{E}[X] &= \int_{x=\theta}^\infty x e^{-(x-\theta)} \, dx \\ &= \int_{y=0}^\infty (y+\theta) e^{-y} \, dy & (\text{substitute } x = y + \theta, \; dx = dy) \\ &= \bigl[ (y+\theta)(-e^{-y}) \bigr]_{y=0}^\infty - \int_{y=0}^\infty (-e^{-y}) \, dy & (\text{IBP; } u = y + \theta, \; dv = e^{-y} \, dy) \\ &= \theta - \bigl[e^{-y}\bigr]_{y=0}^\infty \\ &= \theta + 1. \end{align}$$