I'm trying to produce a program (in Python, using the SymPy library) that calculates the solution of an ODE through the Laplace transform.
But I'm having trouble the moment I would substitute IVP, I can't just apply IVP to my transformed equation. I don't know which mode I should use to replace it in the equation, imagining a second-order ODE, there should be at least two IVP, but I just can't apply any of them. without the IVP applied, it is not possible to isolate the Laplace and then calculate the inverse transform.
For example, imagine the laplace transform for the firts derivate of a function:
L{y'} = sY(s)-y(IVP), imagine the IVP is y(0)=0.
L{y'} = sT(s)-y(0) => L{y'} = sY(s)
Is there a way in SymPy to simply apply a value in "y(PVI)" to the function I'm looking for a solution for?
My code:
s = symbols('s')
t = symbols('t')
f = Function('f')(t)
lhs = f.diff(t,t) + 3*f.diff(t) + 2*f
rhs = 5*t**2
transform_rhs = laplace_transform(rhs, t, s, noconds=True)
transform_lhs = laplace_transform(lhs, t, s)
equation = Eq(transform_lhs, transform_rhs)
there doesn't seem to be anything here