#+PROPERTY: header-args :session laplace_sage :kernel sage :pandoc yes :async yes #+begin_src jupyter-python %display latex var("G, phi, gamma, delta, t, a, b, c, d, Omega", domain=RR) var("z", domain=CC) #+end_src #+RESULTS: :RESULTS: \[\newcommand{\Bold}[1]{\mathbf{#1}}z\] :END: #+begin_src jupyter-python W = gamma + I*delta alpha(t) = G * exp(-W*t - I * phi) alpha #+end_src #+RESULTS: #+begin_src jupyter-python im_alpha = (imag(alpha)) im_alpha #+end_src #+RESULTS: :RESULTS: \[\newcommand{\Bold}[1]{\mathbf{#1}}t \ {\mapsto}\ G e^{\left(-\gamma t\right)} \sin\left(-\delta t - \phi\right)\] :END: #+begin_src jupyter-python im_alpha.laplace(t, z) #+end_src #+RESULTS: : -G⋅(δ⋅cos(φ) + γ⋅sin(φ) + z⋅sin(φ)) : t ↦ ──────────────────────────────────── : 2 2 2 : δ + γ + 2⋅γ⋅z + z #+begin_src jupyter-python matrix([[z, -Omega], [Omega + a, z]]).inverse().simplify_full() #+end_src #+RESULTS: :RESULTS: \[\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} \frac{z}{\Omega^{2} + \Omega a + z^{2}} & \frac{\Omega}{\Omega^{2} + \Omega a + z^{2}} \\ -\frac{\Omega + a}{\Omega^{2} + \Omega a + z^{2}} & \frac{z}{\Omega^{2} + \Omega a + z^{2}} \end{array}\right)\] :END: #+begin_src jupyter-python matrix([[0, 0], [1, 0]]) * matrix([[a, b], [c, d]]) #+end_src #+RESULTS: :RESULTS: \[\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 0 & 0 \\ a & b \end{array}\right)\] :END: #+begin_src jupyter-python matrix([[0, 1], [-1, 0]]) * matrix([[a, b], [c, d]]) #+end_src #+RESULTS: :RESULTS: \[\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} c & d \\ -a & -b \end{array}\right)\] :END: