1
$\begingroup$

This my first problem on Mathematica and I'm working on version 13.0, and I want to get the inverse z transform for an equation, It works fine but it gives me the solution in the positive and negative part of the real x axis.

enter image description here

My question is how to make it gives only the solution in the positive part of the x axis.

$\endgroup$
3
  • 1
    $\begingroup$ "how to make it gives only the solution in the positive part of the x axis." Notice that UnitStep[1 - k]* UnitStep[k - 1]=0 So you only have the term with UnitStep[-2 + k] which makes the solution start at k>2 and zero for k<=2. $\endgroup$
    – Nasser
    Jan 1, 2022 at 18:24
  • 1
    $\begingroup$ @Nasser - Assuming[Element[k, Integers], UnitStep[1 - k]*UnitStep[k - 1] // FullSimplify] evaluates to DiscreteDelta[-1 + k] since UnitStep[0] == 1 $\endgroup$
    – Bob Hanlon
    Jan 1, 2022 at 18:32
  • $\begingroup$ Please post your Mathematica code here. Picture is not so useful. $\endgroup$
    – cvgmt
    Jan 2, 2022 at 5:19

1 Answer 1

2
$\begingroup$
Clear["Global`*"]

I am guessing that your e is actually meant to be E

f[z_] = (1 - E^-t) (2 z - 1)/((z - 1) (z - E^-t));

Note that InverseZTransform takes the option Assumptions

Options[InverseZTransform]

(* {Assumptions :> $Assumptions, Method -> Automatic} *)

Then,

Assuming[k >= 0, InverseZTransform[f[z], z, k] // FullSimplify]

(* Piecewise[{{2 - 2/E^t, k == 1}, 
     {1 + (-2 + E^t)/E^(k*t), k >= 2}}, 0] *)
$\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.