kill(all);

integration by parts : laplace transform,fourier transform (second derivative), version 1.0a
peter.vlasschaert@gmail.com,09/08/2019.

load : packages
=============

load(lrats);

Integration by parts 
===============

d(f*g)=f*dg/dx+g*df/dx
var : x ' example of variable'
f : f(var)
g:g(var)
algo :
====
=>   integrate(f(var)*dg/dvar,var,a,b)  =[f(b)*g(b)]-[f(a)*g(a)] - integrate(df/dvar*g,var,a,b)

F1:Partial Integration : values
----------------------------------------

integrpart(f,m,var,a,b):=block([g],
    g:integrate(m,var),
    m1:'lratsubst([var=b],f*g) - 'lratsubst([var=a],f*g),
    m2:m1-'integrate(g*diff(f,var),var,a,b) )$    

m:dummy variable

p1:integrpart(y^2,exp(4*y),y,0,1);

p1a:ev(p1,nouns),ratsimp;

p2:integrpart(exp(4*y),y^2,y,0,1);

p2a:ev(p2,nouns),ratsimp;

F2:Partial Integration : (s)ymbolic
----------------------------------------------

integrparts(f,m,var):=block([g],
    g:integrate(m,var),
    m1:f*g,
    m2:m1-'integrate(g*diff(f,var),var) )$    

p1b:integrparts(y^2,exp(4*y),y);
p2b:integrparts(exp(4*y),y^2,y);

find: laplace transform : dg/dt = diff(f(t),t)  , f = exp(-s*t)
var :t
g : g(t)
f :  f(t)

assume(m3>0);

p3:integrpart(exp(-s*t),diff(f(t),t),t,0,m3);

assume(s>0);

p3a:ev(p3,nouns);

limit :m3  → inf = ∞

p3b:limit(p3a,m3,inf);

p3b1:args(p3b);

p3b2a:p3b1[1];
p3b2b:p3b1[2];
p3b2c:p3b1[3];

rem :because : m3→∞,f(m3)*%e^(-m3*s) = 0

p4:p3b2a;

p4a:lratsubst([m3=∞],args(p4));

final result :

definition laplace transform:
=====================

p5:f(s) = integrate(%e^(-s*t)*f(t),t,0,inf);

p5a:rhs(p5)=lhs(p5);

laplace transform : diff(f(t),t)  , ' = df/dt'
----------------------------------------------------
use : rem : 'above'

p6:subst([p5a,p4a[2]=0],p4a);

p6a:L(diff(f(t),t))= sum(p6[i],i,1,length(p6));

rem: f(s) = L(f(t))  : 'notation'

definition : laplace transform 
---------------------------------------

p7:f(s) = L(f(t));  

p7a:rhs(p7) = lhs(p7);

rewrite : 'p6a'

p6b:lratsubst([p7],p6a);

p6c:lratsubst([p7a],p6b);

how to find : laplace transform : 'second order derivative' 
===========================================
=>  L [diff(f(t),t,2)]

p8:diff(f(t),t,2);

p8a:f(t) = diff(f(t),t,1);
p8b:f(0) = 'diff(f(0),t);

1e) set : this

p8b1:lratsubst([p8a,p8b],p6b);

final : result : L [diff(f(t),t,2)]
-------------------------------------

p8c:lhs(p8b1) =lratsubst([p6c],rhs(p8b1));

two rule laplace transform :
====================
f(s) = L{f(t)},mathematics

p9a:p6a;
p9b:p8c;

rem : only when:m3→∞,f(m3)*%e^(-m3*s) = 0

find :fourier transform,  'diff(f(t),t,1)
==========================

assume(ω>0);

def fourier transform
----------------------------

 ==================================

p10:fo(ω) =integrate(%e^(-%i*ω*t)*f(t),t,-inf,inf);

p10a:fo(ω) = F(f(t));

p10b:rhs(p10a) = lhs(p10a);

===================================

p11: F(diff(f(t),t))=integrpart(exp(-%i*ω*t),diff(f(t),t),t,-∞,∞);

F(df/dt) ?  ' fourier transform'
-----------------------------------------------

p11a:lratsubst([rhs(p10)=lhs(p10)],p11);

p11b:lratsubst([p10a],p11a);

rem :
lratsubst([t=inf],f(t)*%e^(-%i*t*ω))-lratsubst([t=-inf],f(t)*%e^(-%i*t*ω)) =0

p11c:args(rhs(p11b));

result 
====

p12:lhs(p11b) = p11c[1];

  =>use :lratsubst([t=inf],f(t)*%e^(-%i*t*ω))-lratsubst([t=-inf],f(t)*%e^(-%i*t*ω)) =0

F(d(df/dt)/dt) ?  ' fourier transform' second derivative f(t) with respect to 't'
----------------------------------------------------------------------------------------------------

p13:f(t) =diff(f(t),t);

p13a:lratsubst([p13],p12);

result
====

p13b:lhs(p13a)=lratsubst([p12],rhs(p13a));

F(diff(f(t),t,n))  ? ,above n=1 & n=2
==========================

FTr(h1,n):=(%i*ω)^n*F(h1);

n=1,2,3

p14:[FTr(f(t),1) ,FTr(f(t),2),FTr(f(t),3)];

 =>use :lratsubst([t=inf],f(t)*%e^(-%i*t*ω))-lratsubst([t=-inf],f(t)*%e^(-%i*t*ω)) =0

 ========================================================================