MATHEMATICAL METHODS

5 days ago by reibaretti

# MATHEMATICAL METHODS OF Science and Engineering # FORTRAN codes / Matlab codes #http://www1.uprh.edu/rbaretti #http://www1.uprh.edu/rbaretti/Methodsoftheoreticalphysics.htm # Lectures on Quantum Mechanics http://www1.uprh.edu/rbaretti/LQMIntro.htm # http://www1.uprh.edu/rbaretti/LQMch1.htm #http://www1.uprh.edu/rbaretti/LQMch2.htm # http://www1.uprh.edu/rbaretti/LQMch3.htm # http://www1.uprh.edu/rbaretti/LQMch4.htm # http://www1.uprh.edu/rbaretti/LQMch5.htm #.. 
       
sage: g = Bessel(2); g J_{2} sage: print g J-Bessel function of order 2 sage: g.plot(0,10) 
       
J-Bessel function of order 2
a=2/3 print n(a) 
       
0.666666666666667
print n(pi) 
       
3.14159265358979
var('y,x'); integral(y*exp(-y),y) 
       
-(y + 1)*e^(-y)
var('x,y'); f=(1+x*y)*sin(y); integral(f,y,0,x) 
       
Traceback (click to the left of this block for traceback)
...
Is  x  positive, negative, or zero?
f(x)= x*(sin(x)-x*cos(x))-cos(x) +1 ; diff(f,x) 
       
x |--> x^2*sin(x) - x*cos(x) + 2*sin(x)
var('x'); f2=x-1/2; integral(f2^2,x,0,1) 
       
1/12
phi1=(12)^(1/2)*(x-1/2);integral(phi1^2,x,0,1) 
       
1
f2=x^2; phi0=1; phi1=(12)^(1/2)*(x-1/2); #integral(f2*phi0,x,0,1) phi2=x^2-(1/3)*phi0-(sqrt(3)/6)*phi1; #phi2=sqrt(540/23)*(x^2-(1/3)*phi0-(1/(6*sqrt(3)))*phi1 ); #integral(phi1*phi2,x,0,1) phi2=sqrt(180)*(x^2-(sqrt(3)/6)*phi1-1/3); integral(phi1*phi2,x,0,1) 
       
0
a=1/6*sqrt(3); n(a) 
       
0.288675134594813
#data g0,g1,g2 ,t0,t1,t2/8.,14.,8.,0.,50.,100./ var('t');g0=8;g1=14;g2=8;t0=0;t1=50;t2=100; gama=g0*(t-t1)*(t-t2)/((t0-t1)*(t0-t2))+g1*(t-t0)*(t-t2)/((t1-t0)*(t1-t2))+g2*(t-t0)*(t-t1)/((t2-t0)*(t2-t1)); y=plot(gama,t,0,100) show(y) 
       
var('r'); integral(4*pi*exp(-2*r)*r^2,r,0,oo) 
       
pi
var('a , b ,c, d'); f(x)=a*x^3 + b*x^2 + c*x +d ; d2f(x)=diff(f(x),x,2); x=2; d2f(x) 
       
12*a + 2*b
z=2; phi(p)=(2^(3/2)/pi)*z^(5/2)/(p^2+z^2)^2; integral(phi(p)^2*4*pi*p^2,p,0,oo); 
       
1