4
$\begingroup$

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}]
]
$\endgroup$

2 Answers 2

8
$\begingroup$

Add Assumptions :

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

Addendum

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

$\endgroup$
2
  • 1
    $\begingroup$ I think you missed the point of the question. Mathematica gives the same answer with and without the assumption. $\endgroup$
    – mikado
    Mar 13, 2021 at 14:56
  • 1
    $\begingroup$ @ikado Thanks, I modified my answer. $\endgroup$ Mar 13, 2021 at 15:12
3
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.