Árpád apánk

Blog. ennyi. semmi több. megtalalsz itt jó pár infót rólam, az életemről, meg néhány érdekes dolgot is, csak épp fejlesszem ki. addig is türelem kispajtás :)

2008/05/20

tizedik

> evalf(int(x^2+1,x=-1..1));

2.666666667

> f:=x->x^2+1;

f := proc (x) options operator, arrow; x^2+1 end proc

> ff:=evalf(f(-sqrt(3)/3)+f(sqrt(3)/3));

ff := 2.666666667

> evalf(int(x^3-1,x=0..2));

2.

> g:=x->x^3-1;

g := proc (x) options operator, arrow; x^3-1 end proc

> gg:=evalf(g((-sqrt(3)/3)+1)+g((sqrt(3)/3)+1));

gg := 1.999999999

> z:=x->cos(Pi*x);

z := proc (x) options operator, arrow; cos(Pi*x) end proc

> evalf(int(cos(Pi*x),x=0..1));

0.

> zz:=evalf((1/2)*((5/9)*z((-(-sqrt(15)/5)+1)/2))+(8/9)*z(1/2)+(5/9)*z((-(sqrt(15)/5)+1)/2));

zz := .2605477402

> n:=x->x^2+3*x+2;

n := proc (x) options operator, arrow; x^2+3*x+2 end proc

> diff(n(x),x);

2*x+3

> nn=expand((n(x+0.01)-n(x))/0.01);

nn = 3.01+2.*x

> m:=x->sin(x);

m := sin

> diff(diff(m(x),x),x);

-sin(x)

> mm:=expand((m(x+0.01)-2*m(x)+m(x-0.01))/0.01^2);

mm := -.99999*sin(x)

> xx:=[1,2,3,4,5];

xx := [1, 2, 3, 4, 5]

> yy:=[1,-3,-1,0,1];

yy := [1, -3, -1, 0, 1]

> c:=interp(xx,yy,x);

c := 1/3*x^4-9/2*x^3+65/3*x^2-85/2*x+26

> D(2.5)(c);

0

> px:=[Pi/2,Pi,3*Pi/2,2*Pi,5*Pi/2];

px := [Pi/2, Pi, 3*Pi/2, 2*Pi, 5*Pi/2]

> py:=[1,0,-1,0,1];

py := [1, 0, -1, 0, 1]

> d:=interp(px,py,x);

d := -8*x^4/(3*Pi^4)+16*x^3/Pi^3-94*x^2/(3*Pi^2)+22*x/Pi-4

> D(Pi)(d);

0

> with(CurveFitting);

>

[BSpline, BSplineCurve, Interactive, LeastSquares, PolynomialInterpolation, RationalInterpolation, Spline, ThieleInterpolation]

> PolynomialInterpolation(px,py,x,Newton);

-8*x^4/(3*Pi^4)+16*x^3/Pi^3-94*x^2/(3*Pi^2)+22*x/Pi-4

> with(plots);

Warning, the name changecoords has been redefined

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...

> h:=[[x[0],y(x[0])]];
for i from 0 to 9 do
x[0]:=0;
y(x[0]):=2;

x[i+1]:=x[i]+0.1;
y(x[i+1]):=y(x[i])+0.1*(1+x[i]^2);
h:=[op(h),[x[i+1],y(x[i+1])]];
end do;

h := [[0, 2]]

x[0] := 0

y(0) := 2

x[1] := .1

y(.1) := 2.1

h := [[0, 2], [.1, 2.1]]

x[0] := 0

y(0) := 2

x[2] := .2

y(.2) := 2.201

h := [[0, 2], [.1, 2.1], [.2, 2.201]]

x[0] := 0

y(0) := 2

x[3] := .3

y(.3) := 2.305

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305]]

x[0] := 0

y(0) := 2

x[4] := .4

y(.4) := 2.414

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414]]

x[0] := 0

y(0) := 2

x[5] := .5

y(.5) := 2.530

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414], [.5, 2.530]]

x[0] := 0

y(0) := 2

x[6] := .6

y(.6) := 2.655

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414], [.5, 2.530], [.6, 2.655]]

x[0] := 0

y(0) := 2

x[7] := .7

y(.7) := 2.791

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414], [.5, 2.530], [.6, 2.655], [.7, 2.791]]

x[0] := 0

y(0) := 2

x[8] := .8

y(.8) := 2.940

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414], [.5, 2.530], [.6, 2.655], [.7, 2.791], [.8, 2.940]]

x[0] := 0

y(0) := 2

x[9] := .9

y(.9) := 3.104

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414], [.5, 2.530], [.6, 2.655], [.7, 2.791], [.8, 2.940], [.9, 3.104]]

x[0] := 0

y(0) := 2

x[10] := 1.0

y(1.0) := 3.285

h := [[0, 2], [.1, 2.1], [.2, 2.201], [.3, 2.305], [.4, 2.414], [.5, 2.530], [.6, 2.655], [.7, 2.791], [.8, 2.940], [.9, 3.104], [1.0, 3.285]]

> pointplot(h);

[Plot]

>