Message Boards Message Boards

0
|
2898 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Why doesn't LaplaceTransform work?

Posted 2 years ago
LaplaceTransform[y''[t] - 2 y'[t] + y[t] == 1 + t, t, 
  s] /. {y[0] -> 1, y'[0] -> 0}

I get

LaplaceTransform[
  y[t] - 2 Derivative[1][y][t] + (y^\[Prime]\[Prime])[t], t, s] == 
 1/s^2 + 1/s
POSTED BY: Mariano Gonzalez
4 Replies

This procedure does not work for Mathematica 12.2 and later.

POSTED BY: Mariano Gonzalez

What procedure does not work in version 12.2 and later? Certainly what I showed works in 13; that's where I ran it.

POSTED BY: Daniel Lichtblau

Mariano,

This procedure does not work ...

could it be that there is something wrong with your installation of Mathematica? Because not only Daniels code is working, but also your very first code above as well! Here a combination with Daniels code:

ClearAll["Global`*"]
eq = y''[t] - 2 y'[t] + y[t] == 1 + t;
(* transformed equation: *)
lteq = LaplaceTransform[eq, t, s] /. {y[0] -> 1, y'[0] -> 0};
(* solution of transformed equation: *)
ltsol = First@SolveValues[lteq, LaplaceTransform[y[t], t, s]];
(* solution - transformed back: *)
y[t_] = InverseLaplaceTransform[ltsol, s, t];
(* check: *)
eq // Simplify
(*   Out:   True   *)
POSTED BY: Henrik Schachner

LaplaceTransform works on functions rather than equation. Taking a guess at what you want, we can solve for this Laplace transform in a couple of steps as below.

laplaceratfun = 
 LaplaceTransform[y''[t] - 2 y'[t] + y[t] - (1 + t), t, 
   s] /. {y[0] -> 1, y'[0] -> 0}

(* Out[1285]= -(1/s^2) - 1/s - s + LaplaceTransform[y[t], t, s] + 
 s^2 LaplaceTransform[y[t], t, s] - 
 2 (-1 + s LaplaceTransform[y[t], t, s]) *)

Solve[laplaceratfun == 0, LaplaceTransform[y[t], t, s]]

(* Out[1286]= {{LaplaceTransform[y[t], t, s] -> (
   1 + s - 2 s^2 + s^3)/((-1 + s)^2 s^2)}} *)
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract