kill(all)$

theory: nth derivative dirac delta of function g(x) under integralsign (-∞,∞)
peter.vlasschaert@gmail.com,12/03/2020

load 'packages'

load(lrats)$

function            :
============

p1:y=g(x);

p1a:rhs(p1)=lhs(p1);

inverse function :
============

p2:ginv(y) =x;

test definition :
==========
p2 :operator

p3:subst([p1],p2);

p3a:subst([p1a],p3);

p3a1:rhs(p3a) =lhs(p3a);

p4:subst([p2],p1);

math representation :

p4a:diff(p4);

p4b:subst([del(y) = dy ,del(x) = dx],p4a);

p4c:solve(p4b,dx)[1];

first problem noderivative, 'second argument zero from delta'
============================================

p5:integrate(f(x)*delta(g(x),0),x,-∞,∞);

values : 'p5'
--------------

p5a:args(p5);

use :p4c

p5b:subst([f(x)=f(rhs(p3a1))*c*d,g(x)=g(rhs(p3a1)),p5a[2]=y],p5a);
p5b1:subst([c=1/abs(diff(g(x),x)),d=1],p5b);

plus-minus included :abs('diff(g(x),x,1))
for y = 0  when  x=x0 , root of g(x)

final result:when only one root
======================
when more than one root then a sum of rhs(p5c)

p5c:p5=f(x0)/abs(at(diff(g(x),x),x=x0));

rem :first derivative , find from partial integration = PI

p6:integrate(f(x)*delta(x,1),x,-∞,∞)=-at(diff(f(x),x),x=0);

rem : nth derivative , find from partial integration = PI

p6a:integrate(f(x)*delta(x,n),x,-∞,∞)=(-1)^n*at(diff(f(x),x),x=0);

How to find : nth derivative dirac-delta, delta(g(x),n)
======================================

1e)  first derivative
----------------------

p7a::integrate(f(x)*delta(g(x),1),x,-∞,∞);

2e) nth derivative
---------------------

p7b:integrate(f(x)*delta(g(x),n),x,-∞,∞);

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

1e) first derivative
==============

p8:p7a;

a) representation
=============

use result : with 0 replaced by 1 dirac delta with one,

p8a:subst([0=1],p5b1);

because PI ,minus (-1) see, p6 for sign
=>  (+/-)*(-1) =(-/+)
=============================
rem :(+/-)  from slope of g'(x) = 'diff(g(x),x,1)

 b) differentation :y
==============

p8b:['diff(p8a[1],y),y,-∞,∞];

=>   d/dy = dx/dy*d/dx      , chain rule.
=>   (f/g)  = (f'*g-g'*f)/g^2 , rule differentation.

c) conversion to :x
==============
sign: -/+,dy/dx = diff(g(x),x),use chain rule

p8b1:[dx/dy*'diff(p8a[1],x),y,-∞,∞];

p8c1:p7a=dx/dy*diff(f(x)/diff(g(x),x),x);

p8c2:lratsubst([dx/dy=1/ diff(g(x),x)] ,p8c1);

how to find sign = sign(g'(x0))*(-1)^n=cc[i] , n=1 ,first derivative.i=1

one root : y=0 , x=x0,realroot , (-∞,∞)
----------------------------------------------
=> x=x0, i=1

p8c3:lhs(p8c2) =at(rhs(p8c2)*cc[i],x=x0);

p8c31:subst([i=1],p8c3);

how to find sign = sign(g'(x[i]0))*(-1)^n=cc[i] , n=1 ,first derivative (i=1..m).

all root : y=0,  x=x[i](0),realroots, (-∞,∞) , m = roots
---------------------------------------------------------------
=> x=x[i](0),i=1..m

p8c4:lhs(p8c3)=subst([x0=x[i](0)],sum(rhs(p8c3),i,1,m));

2e) nth derivative
=============

p9:p7b;

representation
------------------

p9a:p8b:['diff(p8a[1],y,n),y,-∞,∞];

same principal n=1  use n=n

p9b:subst([1=n],lhs(p8c4)) ;

see : n times ,

p9b1:(1/diff(g(x),x))^n*diff(f(x)/diff(g(x),x),x,n);

=>  i=1..m for all real roots in (-∞,∞),x[i](0)

p9b2:at(p9b1,x=x[i](0));

 => 1e) correction: partial integration, (-1)^(n)
 => 2e) correction : slope ( = dy/dx).  =  sign(x[i](0))
=======================================
combination : cc[i] = (-1)^(n)*sign(x[i](0))
i=1...m , m :roots

p9b3:p9b=sum(cc[i]*p9b2,i,1,m);

see website : 'n th derivative',maple code,maxima code.