kill(all)$

calculus :double integral to a single integral,version 1.0
peter.vlasschaert@gmail.com,21/08/2019

→  FTC            : ' see website '
→  leibniz rule : ' see website '

load packages
---------------------

load(lrats);

assume(x>a,a>0);

declare(n,integer)$

p1:I[n](x):=integrate((x-t)^(n-1)*y(t),t,a,x);

p1 : 'x' upper limit of integration
       'n'  integer 

rem :  analysis integral : p1
-------------------------------------

pa1:rhs(p1);

pa2:args(pa1);

pa31:pa2[1];   /*function F(x,t ) */
pa32:pa2[2];   /*integration variable */
pa33:pa2[3];    /*lower limit of integration */
pa34:pa2[4];    /* upper limit of integration */

special values :'I[0](x),'I[1](x)
=====================

p1a1:'I[0](a) = I[0](a);

p1a2:'I[0](x) = I[0](x);

p1b1:'I[1](x) = I[1](x);

p1b2:'diff(p1b,x);

p1b2:'I[1](a) = I[1](a);

differentiating 'p1' with respect x
=========================

answer: leibniz rule for integration under integral sign

definition : leibniz rule
------------------------------

p3:'diff(integrate(F(x,t),t,H(x),G(x)),x) = diff(integrate(F(x,t),t,H(x),G(x)),x);

p3a:lratsubst([F(x,t) = pa31,H(x) = a,G(x) =x],p3);

p3b:lhs(p3a) = ev(rhs(p3a),nouns);

rem: F(x,x) = 0,
--------------------

p3c:lhs(p3a) = subst([F(x,x)=0],rhs(p3b));

rem : I[2](x)
-----------------

p3d1:'I[n](x) = I[n](x);

p3d1a:rhs(p3d1) = lhs(p3d1);

p3d2:'I[n-1](x) = I[n-1](x);

p3d2a:rhs(p3d2) = lhs(p3d2);

general form : 'p3c'
===============

assume(n>1);

p4:subst([p3d1a,p3d2a],p3c);

two times : with respect differentiating with respect x
-----------------------------------------------------------------------

p4a:'diff(lhs(p4),x)=ev(diff(rhs(p4),x),nouns);

p4a1:I[n-2](x) = 'I[n-2](x);

p4b:subst([p4a1],p4a);

k times :with respect differentiating with respect x
-------------------------------------------------------------------

declare(k,integer);

assume(k<n);

p5:diff(lhs(p1),x,k)=ev(diff(pa1,x,k),nouns);

example :  k=4

p5a:subst([k=4],p5);lhs(p5a) =ev(rhs(p5a),nouns);

p5b:integrate(y(t)*(x-t)^(n-5),t,a,x) =' I[n-4](x);

rem :use out ref (out : %onumber)

p5c:subst([p5b],%o32);

p5d:subst([n=5],p5c);

rem :
0! =1,1! = 1, 2! = 2,3! = 6,4! =4!

p5e:makelist( ''i! = i!,i,1,5);

p5e:lhs(p5d)=( 5-1)! *i[1](x);

n=5 : 4! = 4*3*2*1  = (n-1)*(n-2)*(n-3)(n-2)
n=5 : 4! =                =  (n-1)*(n-2)......(n-k)

k times : with respect differentiating with respect x
---------------------------------------------------------------------

p6:diff(lhs(p1),x,k)=product(n-i,i,1,k)*'I[1](x);

(n-1) times : with respect differentiating with respect x
-------------------------------------------------------------------------
replace : k = n-1  into  'p6'

p6a:subst([k = n-1],p6);

p6b:lhs(p6a) =expand(rhs(p6a));

p6b1:(product(n-i,i,1,n-1)) = (n-1)!;

p6b2:subst([p6b1],p6b);

extra : one more time differentiating  'p6b2' with respect to x
----------------------------------------------------------------------------------

p7:diff(p6b2,x);

p7a:subst([p1b1],p7);

rem : use  FTC1 : Fundamental THeorem Calculus
=> ('diff(integrate(y(t),t,a,x),x,1))  => f(x)

p7a1:'diff(integrate(y(t),t,a,x),x)= y(x);

p7a2:subst([p7a1],p7a);

rem:(n-1) derivatives all vanish @ x=a
-----------------------------------------------------

p8:'I[1](x) = I[1](x);
p9:'I[2](x) = I[2](x);

p10:subst([n=2],p7a2);

p10a:integrate(p10,x);

p10b:integrate(p10a,x);

double integral: because lower limit x=a,
%c1 = 0, %c2 = 0

When put in the limits of integration : no meaning any more
%c1,%c2.

p10c:'I[2](x)=integrate(integrate(y(x),x,a,x),x,a,x);

p10d:ev(p10c,nouns);

final result
========

How convert a double integral to a single integral.

p11:rhs(p10d) = lhs(p10d);

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

Theoretical concept :  convert  BVP to Integral Equation.
 BVP = Boundary Value Problem

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

rem : general ' n the integral ' from : 'p7a2'