### Related

##### romberg

eq1:x*4+y-2=y;

eq2:x+2=y;

romberg(1/x, 1, 3);

Calculate

t1:8;

t2:20;

i0:1000;

Calculate

##### romberg

romberg (e^(-x^2),x,0...

Calculate

##### romberg

D1curvabezier(t):=[4*...

romberg(D1curvabezier...

Calculate

##### romberg

romberg(1/(x*x+1),x,-...

Calculate

##### romberg

romberg (x^2/(2*(2^.5...

Calculate

##### romberg-sqrt

romberg(sqrt(1+(2*x)^...

Calculate

##### romberg

romberg (2.718^(-x^2)...

Calculate

##### romberg

romberg(ln(x^2),x,-5,...

Calculate

##### romberg

romberg (x/(x^.5),x,0...

Calculate

### romberg

Run Example
(%i1)f(x):=exp(-x^2);
2
(%o1)                          f(x) := exp(- x )
(%i2) tex( expand( integrate( (x-y-l)*f(x), x, l+y, inf) ));
$${{\sqrt{\pi}\,y\,\mathrm{erf}\left(y+l\right)}\over{2}}+{{\sqrt{\pi }\,l\,\mathrm{erf}\left(y+l\right)}\over{2}}+{{e^{-y^2-2\,l\,y-l^2} }\over{2}}-{{\sqrt{\pi}\,y}\over{2}}-{{\sqrt{\pi}\,l}\over{2}}$$
(%o2)                                false
(%i3) tex(integrate( expand( integrate( (x-y-l)*f(x), x, l+y, inf) * f(y)),y, -inf,inf));
$$\int_{-\infty }^{\infty }{{{\sqrt{\pi}\,y\,e^ {- y^2 }\, \mathrm{erf}\left(y+l\right)}\over{2}}+{{\sqrt{\pi}\,l\,e^ {- y^2 } \,\mathrm{erf}\left(y+l\right)}\over{2}}-{{\sqrt{\pi}\,y\,e^ {- y^2 }}\over{2}}-{{\sqrt{\pi}\,l\,e^ {- y^2 }}\over{2}}+{{e^{-2\,y^2-2\, l\,y-l^2}}\over{2}}\;dy}$$
(%o3)                                false
(%i4) integrate( expand( integrate( (x-y-l)*f(x), x, l+y, inf) * f(y)),y, -inf,inf);
inf                     2                               2
/                     - y                             - y
[       sqrt(%pi) y %e     erf(y + l)   sqrt(%pi) l %e     erf(y + l)
(%o4) I      (----------------------------- + -----------------------------
]                     2                               2
/
- inf
2                    2          2            2
- y                  - y      - 2 y  - 2 l y - l
sqrt(%pi) y %e       sqrt(%pi) l %e       %e
- ------------------ - ------------------ + ---------------------) dy
2                    2                      2
(%i5) integrate( y*exp(-y^2), y, -inf,inf);
(%o5)                                  0
(%i6) integrate( exp(-y^2)*erf(y+l),y,-inf,inf );
inf
/           2
[        - y
(%o6)                     I      %e     erf(y + l) dy
]
/
- inf
(%i7) integrate( y*exp(-y^2),y,-inf,inf);
(%o7)                                  0
(%i8) integrate( exp(-y^2),y,-inf,inf);
(%o8)                              sqrt(%pi)
(%i9) integrate( exp(-(y+l)^2),y,-inf,inf);
(%o9)                              sqrt(%pi)
(%i10) romberg(exp(-y^2)*erf(y+l),y,-inf,inf);
2
- y
(%o10)           romberg(%e     erf(y + l), y, - 1.0 inf, inf)
(%i11) 
Run Example
a:2;
(%o1)                                  2
(%i2) b:1;
(%o2)                                  1
(%i3) x(t):= (a+b/sqrt((b*cos(t))^2+(a*sin(t))^2))*cos(t);
b
(%o3)        x(t) := (a + -------------------------------) cos(t)
2             2
sqrt((b cos(t))  + (a sin(t)) )
(%i4) y(t):= (b+a/sqrt((b*cos(t))^2+(a*sin(t))^2))*sin(t);
a
(%o4)        y(t) := (b + -------------------------------) sin(t)
2             2
sqrt((b cos(t))  + (a sin(t)) )
(%i5) romberg(2*%pi*x(t)^2*diff(y(t), t), t, 0, %pi/2)-(a^2*b)*4*%pi/3;
16 %pi
(%o5)                     77.10985457200239 - ------
3
(%i6) 
Run Example
assume(x>
0);
(%o1)                               [x > 0]
(%i2) romberg(1/sqrt(-1+exp(x)*erfc(sqrt(x)) + 2*sqrt(x/%pi)),x,0,0.01);
1
(%o2)   romberg(---------------------------------------, x, 0.0, 0.01)
x   2 sqrt(x)
sqrt(erfc(sqrt(x)) %e  + --------- - 1)
sqrt(%pi)
(%i3) 

Help for Romberg