# Specify range of variable in a equation

I have a simple integral, I get the answer in terms of (h-1) whereas I know h is smaller than 1 and greater than zero. How could I implement this is the fully simplify.

FullSimplify[
Integrate[t1^2*E^((1 - h)*s0*t1), {t1, 0, T}]
]


zw=FullSimplify[
Integrate[t1^2*E^((1 - h)*s0*t1), {t1, 0, T}],
Assumptions -> 0 < h < 1
]


zw /. h -> 1 - m /. m -> 1 - h
(*-((2 + E^((1 - h) s0 T) (-2 + (1 - h) s0 T (2 - (1 - h) s0 T)))/((1 -
h)^3 s0^3))*)


shows the result with terms 1-h

• I think you missed the point of the question. Mathematica gives the same answer with and without the assumption. Mar 13, 2021 at 14:56
• @ikado Thanks, I modified my answer. Mar 13, 2021 at 15:12

I think you would like to show the result in terms of 1-h rather than -(-1+h). To achieve this, I would do the following

expr = FullSimplify[Integrate[t1^2*E^((1 - h)*s0*t1), {t1, 0, T}]];

rule = h -> 1 - HoldForm[1 - h];

expr /. rule;


You can use the resulting expression as is, but if you need to simplify inside the 1-h, use ReleaseHold.