Skip to content

Commit

Permalink
Merge pull request #1298 from gnu-octave/laplace_test
Browse files Browse the repository at this point in the history
Add a laplace transform test
  • Loading branch information
cbm755 authored May 14, 2024
2 parents 4849161 + ec9c2a8 commit ad3719c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion inst/@sym/laplace.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% Copyright (C) 2014-2016 Andrés Prieto
%% Copyright (C) 2015-2016, 2019 Colin Macdonald
%% Copyright (C) 2015-2016, 2019, 2024 Colin Macdonald
%%
%% This file is part of OctSymPy.
%%
Expand Down Expand Up @@ -214,3 +214,12 @@
%! % SymPy cannot evaluate? (Issue #170)
%! syms s f(t)
%! assert(logical( laplace(diff(f(t),t),t,s) == s*laplace(f(t),t,s)-f(0) ))

%!test
%! % https://github.com/gnu-octave/symbolic/issues/1295
%! % fails on SymPy 1.10.* and 1.11.*
%! if (pycall_sympy__ ('return Version(spver) >= Version("1.12")'))
%! syms t s
%! L = simplify (laplace (3*t*sin (4*t)));
%! assert (isAlways (L == 24*s / (s^2 + 16)^2))
%! end

0 comments on commit ad3719c

Please sign in to comment.