# Why does the assuming not work as expected?

Why does this not work? I expect the output would be something like 1/s*e^-(sT).

Assuming[T > 0,
LaplaceTransform[UnitStep[t - T], t, s]] // FullSimplify


• FullSimplify[LaplaceTransform[UnitStep[t - T], t, s], T > 0] and I don't know the exact reason for this.
– Syed
Nov 9, 2022 at 16:16
• @Syed what would be the reason that my code not work? Nov 9, 2022 at 16:18
• Assuming[T > 0, Refine[LaplaceTransform[UnitStep[t - T], t, s]]]
– Syed
Nov 9, 2022 at 16:22
• @Syed I see. I only works with some functions such as Refine or Simplify. So I probably always have to wrap the expression around these functions. Nov 9, 2022 at 16:27
• I'm neither a developer nor very knowledgeable, but I think I do have the answer. Please do let me know if this helps. Nov 9, 2022 at 17:18

# TL;DR;

You have to put FullSimplify inside Assuming because Assuming does not change the properties of an expression but instead, it creates a limited scope with a modified value for $Assumptions # Long Explanation Assuming is not been used by LaplaceTransform to do FullSimplify and where you place the your explicit FullSimplify with respect Assuming matters. ## Background Not all functions take $Assumptions into account, most will just ignore it.

From the documentation

Assuming[assum,expr] evaluates expr with assum appended to $Assumptions, so that assum is included in the default assumptions used by functions such as Refine, Simplify, and Integrate. Assuming affects the default assumptions for all functions that have an Assumptions option. LaplaceTransform does have Assumptions as Options so it will give you an answer that is compatible with those $Assumptions

MemberQ[Assumptions]@Keys[Options[LaplaceTransform]]

True


However, LaplaceTransform doesn't use those $Assumptions to FullSimplify the expression the way you may expect, as FullSimplify can take too long to run or it may go too far and do something you may not necessarily want . The documentation for FullSimplify warns : Some of the transformations used by FullSimplify are only generically correct. Results of simplification of singular expressions are uncertain. ## Your case Now, look at the order you are evaluating things, by the time FullSimplify evaluates the expression, your specified $Assumptions have been dropped.

Assuming[
T > 0,  (* Modified $$Assumptions affect LaplaceTransform *) LaplaceTransform[UnitStep[t - T], t, s] ] // FullSimplify (* Only default$$Assumptions affect FullSimplify  *)


By changing the evaluation order, you can make FullSimplify to be within the scoping environment where $Assumptions is modified. Assuming[ T > 0, (* Modified$Assumptions affect both LaplaceTransform and FullSimplify *)
LaplaceTransform[UnitStep[t - T], t, s] // FullSimplify
]


Think of Assuming as equivalent to

Block[
{ $Assumptions = T>0 }, LaplaceTransform[UnitStep[t - T], t, s] ]  If you leave FullSimplify outside Block then it will not see the modified $Assumptions.

Block[
{ $Assumptions = T>0 }, LaplaceTransform[UnitStep[t - T], t, s] ] // FullSimplify  If you put FullSimplify inside Block then it will see the modified $Assumptions.

Block[
{$Assumptions =T>0}, LaplaceTransform[UnitStep[t - T], t, s] // FullSimplify ]  • Thanks for the detalied and interesting answer. Why does the assumption not have any effect in this case Block[ {$Assumptions =T>0}, LaplaceTransform[UnitStep[t - T], t, s] ]? Nov 9, 2022 at 17:18
• It does, but as explained, LaplaceTransform will give you an answer that is consistent with the $Assumptions but without attempting to simplify the answer in the same way FullSimplify does. Nov 9, 2022 at 17:21 • But LaplaceTransform[UnitStep[t - T], t, s] produces the same exact expression without using assumption. Or LaplaceTransform just assumed T > 0 by default somehow? Nov 9, 2022 at 17:23 • @internet I don't understand your last comment. Nov 10, 2022 at 12:03 • These two codes give the exact same result: Block[ {$Assumptions =T>0}, LaplaceTransform[UnitStep[t - T], t, s] ]  and LaplaceTransform[UnitStep[t - T], t, s] . So the Block with the assumption doesn't seem to be used in the first case. Nov 11, 2022 at 18:07