PKÚclXñB–Hmimetypetext/x-wxmathmlPKÚclXQdBV55 format.txt This file contains a wxMaxima session in the .wxmx format. .wxmx files are .xml-based files contained in a .zip container like .odt or .docx files. After changing their name to end in .zip the .xml and eventual bitmap files inside them can be extracted using any .zip file viewer. The reason why part of a .wxmx file still might still seem to make sense in a ordinary text viewer is that the text portion of .wxmx by default isn't compressed: The text is typically small and compressing it would mean that changing a single character would (with a high probability) change big parts of the whole contents of the compressed .zip archive. Even if version control tools like git and svn that remember all changes that were ever made to a file can handle binary files compression would make the changed part of the file bigger and therefore seriously reduce the efficiency of version control wxMaxima can be downloaded from https://github.com/wxMaxima-developers/wxmaxima. It also is part of the windows installer for maxima (https://wxmaxima-developers.github.io/wxmaxima/). If a .wxmx file is broken but the content.xml portion of the file can still be viewed using an text editor just save the xml's text as "content.xml" and try to open it using a recent version of wxMaxima. If it is valid XML (the XML header is intact, all opened tags are closed again, the text is saved with the text encoding "UTF8 without BOM" and the few special characters XML requires this for are properly escaped) chances are high that wxMaxima will be able to recover all code and text from the XML file. PKÚclXlà³$Q$Q content.xml Kedvenc Matematikai Kísérleteim Alapok Halmazok Számok Határérték Differenciálszámítás Integrálszámítás Primitív függvények Határozott integrál Alkalmazások Még nincs kész! Végtelen kicsinyek Görbe hossza, heurisztikusan Feladat y:diff(x^2,x); (%o1) 2*x integrate(sqrt((2*x)^2+1),x,0,a); Is a positive, negative or zero? assume(a>0); (%o180) [a>0] integrate(sqrt((2*x)^2+1),x,0,a); (%o181) asinh

2*a

+2*a*4*a2+1
4
Feladat assume(r>0); (%o185) [r>0] x:r*(t-sin(t)); (%o184) r*

t−sin

t

xp:diff(x,t); (%o186) r*

1−cos

t

y:r*(1-cos(t)); (%o187) r*

1−cos

t

yp:diff(y,t); (%o188) r*sin

t

zpa:sqrt(xp^2+yp^2); (%o201) r2*sin

t

2
+r2*

1−cos

t

2
trigsimp(%); (%o202) 2*r2−2*r2*cos

t

assume(T>0); (%o203) [redundant] assume(T<%pi/2); (%o204) [redundant] integrate(zpa,t,0,T); (%o205)

−2*cos

T

−2

*sin

T+%pi2

+2*sin

T

*cos

T+%pi2

*r+4*r
trigreduce(%); (%o206) 4*r−4*cos

T2

*r
Feladat (1) x:'x; (%o210) x y:x^(3/2); (%o211) x32 yp:diff(y,x); (%o213) 3*x2 zpa:sqrt(yp^2+1); (%o214) 9*x4+1 integrate(zpa,x,0,4); (%o215) 8*103227−827 (2) y:log(1-x^2); (%o216) log

1−x2

yp:diff(y,x); (%o217) −2*x1−x2 zpa:sqrt(yp^2+1); (%o218) 4*x2

1−x2

2
+1
assume(a<1); (%o219) [a<1] integrate(zpa,x,0,a); (%o220) log

a+1

−a−log

1−a

(3) y:log(cos(x)); (%o1) log

cos

x

yp:diff(y,x); (%o2) −sin

x

cos

x

zpa:sqrt(yp^2+1); (%o3) sin

x

2
cos

x

2
+1
forget(a<1); (%o4) [a<1] assume(a<%pi/2,a>0); (%o5) [%pi2>a,a>0] integrate(zpa,x,0,a); Is cos

x

positive or negative? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil.
assume(cos(x)>0); (%o7) [cos

x

>0]
integrate(zpa,x,0,a); (%o8) asinh

tan

a

(4) y:log((exp(x)+1)/(exp(x)-1)); (%o1) log

%ex+1%ex−1

yp:diff(y,x); (%o2)

%ex−1

*

%ex%ex−1−%ex*

%ex+1

%ex−1

2

%ex+1
ratsimp(%); (%o3) −2*%ex%e2*x−1 zpa:sqrt(%^2+1); (%o4) 4*%e2*x

%e2*x−1

2
+1
integrate(zpa,x,a,b); Is %e2*x−1.0 positive or negative? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(exp(2*x)>1); (%o7) [%e2*x>1] integrate(zpa,x,a,b); Is %eb−%ea positive, negative or zero? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(exp(b)>exp(a)); (%o9) [%eb>%ea] integrate(zpa,x,a,b); Is %eb−1 positive, negative or zero? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(b>0); (%o20) [b>0] integrate(zpa,x,a,b); Is %ea−1 positive, negative or zero? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(a>0); (%o13) [a>0] integrate(zpa,x,a,b); (%o14) 2*log

%e2*b−1

−2*b−2*log

%e2*a−1

+2*a
2
(5) facts(); (%o21) [b>0] forget(b>0); (%o22) [b>0] assume(d>0); (%o27) [d>0] y:cosh(b*x)/b; (%o28) cosh

b*x

b
yp:diff(y,x); (%o29) sinh

b*x

zpa:sqrt(yp^2+1); (%o30) sinh

b*x

2
+1
integrate(zpa,x,0,d); (%o31) %e−b*d*

%e2*b*d−1

2*b
Feladat forget(d>0); (%o32) [d>0] (1) assume(a>0); (%o33) [a>0] x:a*cos(t)^3; (%o34) a*cos

t

3
xp:diff(x,t); (%o35) −3*a*cos

t

2
*sin

t

y:a*sin(t)^3; (%o36) a*sin

t

3
yp:diff(y,t); (%o37) 3*a*cos

t

*sin

t

2
zpa:sqrt(xp^2+yp^2); (%o41) 9*a2*cos

t

2
*sin

t

4
+9*a2*cos

t

4
*sin

t

2
zpa:trigsimp(%); (%o43) a*9*sin

t

2
−9*sin

t

4
integrate(zpa,t,0,2*%pi); (%o44) 0 zpa:3*a*sin(t)*cos(t); (%o46) 3*a*cos

t

*sin

t

Ennek az abszolút értéke kell 4*integrate(zpa,t,0,%pi/2); (%o47) 6*a (2) facts(); (%o50) [a>0] x:a*cos(t)^4; (%o48) a*cos

t

4
xp:diff(x,t); (%o49) −4*a*cos

t

3
*sin

t

y:a*sin(t)^4; (%o51) a*sin

t

4
yp:diff(y,t); (%o52) 4*a*cos

t

*sin

t

3
zpa:sqrt(xp^2+yp^2); (%o55) 16*a2*cos

t

2
*sin

t

6
+16*a2*cos

t

6
*sin

t

2
zpa:trigsimp(%); (%o56) 16*a2*cos

t

2
*sin

t

6
+16*a2*cos

t

6
*sin

t

2
zpa:2*a*sin(2*t)*sqrt(sin(t)^4+cos(t)^4); (%o58) 2*a*sin

t

4
+cos

t

4
*sin

2*t

Ennek az abszolút értéke kell integrate(zpa,t,0,%pi/2); (%o59) 2*

2*asinh

1

+28+asinh

1

252
+14

*a
(3) facts(); (%o60) [a>0] x:exp(t)*(cos(t)+sin(t)); (%o63) %et*

sin

t

+cos

t

xp:diff(x,t); (%o65) %et*

sin

t

+cos

t

+%et*

cos

t

−sin

t

y:exp(t)*(cos(t)-sin(t)); (%o66) %et*

cos

t

−sin

t

yp:diff(y,t); (%o67) %et*

cos

t

−sin

t

+%et*

−sin

t

−cos

t

zpa:sqrt(xp^2+yp^2); (%o68)

%et*

sin

t

+cos

t

+%et*

cos

t

−sin

t

2
+

%et*

cos

t

−sin

t

+%et*

−sin

t

−cos

t

2
ratsimp(%); (%o69) 4*%e2*t*sin

t

2
+4*%e2*t*cos

t

2
trigsimp(%); (%o70) 2*%et integrate(%,t,0,a); (%o71) 2*

%ea−1

(4) x:t-tanh(t); (%o73) t−tanh

t

xp:diff(x,t); (%o74) 1−sech

t

2
y:1/cosh(t); (%o75) 1cosh

t

yp:diff(y,t); (%o76) −sinh

t

cosh

t

2
zpa:sqrt(xp^2+yp^2); (%o77) sinh

t

2
cosh

t

4
+

1−sech

t

2

2
ratsimp(%); (%o78) sinh

t

2
+cosh

t

4
*sech

t

4
−2*cosh

t

4
*sech

t

2
+cosh

t

4
cosh

t

2
trigsimp(%); (%o79) sinh

t

4
+sinh

t

2
cosh

t

2
radcan(%); (%o80) sinh

t

*sinh

t

2
+1
cosh

t

2
trigsimp(%); (%o81) sinh

t

cosh

t

integrate(%,t,0,1); (%o83) log

%e+%e−12

(5) x:cot(t); (%o84) cot

t

xp:diff(x,t); (%o85) −csc

t

2
y:1/(2*sin(t)^2); (%o86) 12*sin

t

2
yp:diff(y,t); (%o87) −cos

t

sin

t

3
zpa:sqrt(xp^2+yp^2); (%o91) cos

t

2
sin

t

6
+csc

t

4
trigsimp(%); (%o92) 1sin

t

2
*sin

t

integrate(%,t,-%pi/4,%pi/4); (%o93) −%pi4%pi41sin

t

2
*sin

t

dt
Divergens. (6) facts(); (%o94) [a>0] assume(b>0); (%o103) [b>0] x:a*t*cos(t); (%o104) a*t*cos

t

xp:diff(x,t); (%o105) a*cos

t

−a*t*sin

t

y:a*t*sin(t); (%o106) a*t*sin

t

yp:diff(y,t); (%o107) a*sin

t

+a*t*cos

t

zpa:sqrt(xp^2+yp^2); (%o108)

a*cos

t

−a*t*sin

t

2
+

a*sin

t

+a*t*cos

t

2
ratsimp(%); (%o109)

a2*t2+a2

*sin

t

2
+

a2*t2+a2

*cos

t

2
trigsimp(%); (%o110) a2*t2+a2 integrate(%,t,0,b); (%o111) a*asinh

b

+b*a2*b2+a2
2
Feladat kill(all); (%o0) done (1) y:t; x:t^2/2/p; (%o1) t(%o2) t22*p (2) x:a*cos(t); y:b*sin(t); (%o3) a*cos

t

(%o4) b*sin

t

(3) x:a*(cos(t))^3; y:a*(sin(t))^3; (%o7) a*cos

t

3
(%o8) a*sin

t

3
(4) eq:x^3+y^3=3*a*x*y; (%o1) y3+x3=3*a*x*y subst(y=t*x,eq); (%o2) t3*x3+x3=3*a*t*x2 solve(%,x); (%o3) [x=3*a*tt3+1,x=0] y:t*rhs(%[1]); (%o4) 3*a*t2t3+1 Feladat Polárkoordinátákkal adott szektor területe, heurisztikusan Feladat .5*integrate(a^2*cos(2*t),t,-%pi/4,%pi/4); (%o112) 0.5*a2 Feladat (1) r:a*sqrt(1/(sin(t)^4+cos(t)^4)); (%o115) asin

t

4
+cos

t

4
integrate(%^2/2,t,0,2*%pi); (%o116) −

665857*232−1883328

*%pi*a2
2*

29427*292−665857

float(%), numer; (%o117) 4.447461810915946*a2 (2) r:(cos(t)^2*sin(t)/(cos(t)^4+sin(t)^4)); (%o1) cos

t

2
*sin

t

sin

t

4
+cos

t

4
plot2d([parametric,r*cos(t),r*sin(t)],[t,0,%pi/2], same_xy)$ integrate(r^2/2,t,0,%pi/2); (%o148) %pi292 Munka kiszámítása Forgástest térfogata, heurisztikusan Példa Feladat (1) f:asin(x); (%o4) asin

x

%pi*integrate(f^2,x,0,1); (%o5) %pi*

%pi2−8

4
(2) f:exp(-x)*sqrt(sin(x)); (%o6) %e−x*sin

x

%pi*integrate(f^2,x,0,%pi); (%o8) %pi*

%e−2*%pi5+15

(3) facts(); (%o11) [] assume(a>0); (%o12) [a>0] f:cosh(x); (%o13) cosh

x

%pi*integrate(f^2,x,-a,a); (%o14) %pi*%e−2*a*

%e4*a+4*a*%e2*a−1

4
Feladat y:b*sqrt(1-x^2/a^2); (%o15) b*1−x2a2 %pi*integrate(y^2,x,-a,a); (%o16) 4*%pi*a*b23 Forgásfelület felszíne, heurisztikusan Példa Feladat r:'r; (%o22) r integrate(2*%pi*(r+(R-r)*x/m)*sqrt(1+(R-r)^2/m^2), x,0,m); (%o23) %pi*

R−r

2
m2
+1
*

m*r+R*m

ratsimp(%); (%o24)

%pi*m*r+%pi*R*m

*r2−2*R*r+m2+R2
m
Feladat (1) facts(); (%o25) [a>0] forget(a>0); (%o26) [a>0] f:exp(x); (%o27) %ex fp:diff(f,x); (%o28) %ex assume(b>a); (%o30) [b>a] 2*%pi*integrate(f*sqrt(1+fp^2),x,a,b); (%o31) 2*%pi*

asinh

%eb

+%eb*%e2*b+12−asinh

%ea

+%ea*%e2*a+1
2

(2) assume(a>0); (%o35) [a>0] f:sqrt(x); (%o36) x fp:diff(f,x); (%o37) 12*x 2*%pi*integrate(f*sqrt(1+fp^2),x,a,b); (%o38) 2*%pi*

4*b+1

3212−

4*a+1

32
12

(3) f:sin(x); (%o39) sin

x

fp:diff(f,x); (%o40) cos

x

2*%pi*integrate(f*sqrt(1+fp^2),x,0,%pi); (%o41) 2*%pi*

asinh

1

+2

(4) f:cosh(x); (%o42) cosh

x

fp:diff(f,x); (%o43) sinh

x

2*%pi*integrate(f*sqrt(1+fp^2),x,-a,a); (%o44) %pi*%e−2*a*

%e4*a+4*a*%e2*a−1

2
(5) kill(all); f:tan(x); (%o1) tan

x

fp:diff(f,x); (%o2) sec

x

2
assume(cos(x)>0); (%o6) [cos

x

>0]
2*%pi*integrate(f*sqrt(1+fp^2),x,0,%pi/4); (%o7) 2*%pi*

asinh

1

2−asinh

12

2
+52−12

ratsimp(%); (%o8) 2*%pi*asinh

1

−2*%pi*asinh

12

+

2*5−2

*%pi
2
(6) kill(all); (%o0) done f:x^2; (%o1) x2 fp:diff(f,x); (%o2) 2*x 2*%pi*integrate(f*sqrt(1+fp^2),x,-1,1); (%o3) −%pi*

asinh

2

−18*5

16
Tömeg, tömegközéppont, tehetetlenségi nyomaték Feladat (1) solve(2-x=2*x-x^2,x); (%o45) [x=1,x=2] integrate(2*x-x^2-2+x,x,1,2); (%o46) 16 (2) integrate(x+1-2^x+1,x,0,1); (%o48) 5*log

2

−2
2*log

2

(3) facts(); (%o59) [b>a,a>0] 2*integrate(x*sqrt(a^2-x^2),x,0,a); (%o61) 2*a33 Feladat (1) y:'y; (%o63) y integrate(integrate(2*x+3*y+4,x,0,y),y,0,1); (%o64) 103 (2) integrate(integrate(2*x+3*y+4,x,0,y),y,0,1); (3) integrate(integrate(2,x,0,y^(1/4)),y,0,1); (%o97) 85 (4) assume(a>0,b>0,c>0); (%o1) [a>0,b>0,c>0] integrate(integrate(8*c*sqrt(1-x^2/a^2-y^2/b^2), x,0,a*sqrt(1-y^2/b^2)), y,0,b); Is

y−b

*

y+b

positive or negative? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil.
facts(); (%o3) [a>0,b>0,c>0] assume(y<b); (%o4) [b>y] integrate(integrate(8*c*sqrt(1-x^2/a^2-y^2/b^2), x,0,a*sqrt(1-y^2/b^2)), y,0,c); Is y+b positive or negative? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(y<b); (%o108) [b>y] integrate(integrate(8*c*sqrt(1-x^2/a^2-y^2/b^2), x,0,a*sqrt(1-y^2/b^2)), y,0,c); Is y+b positive or negative? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(y+b>0); (%o6) [y+b>0] integrate(integrate(8*c*sqrt(1-x^2/a^2-y^2/b^2), x,0,a*sqrt(1-y^2/b^2)), y,0,b); (%o7) 4*%pi*a*b*c3 (5) integrate(integrate(8*(1-x-y),x,0,1-y),y,0,1); (%o9) 43 (6) integrate(integrate(sqrt(1-(x+y)^2),x,0,1-y),y,0,1); Is y zero or nonzero? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(y>0); (%o11) [y>0] integrate(integrate(sqrt(1-(x+y)^2),x,0,1-y),y,0,1); Is y−1 positive, negative or zero? Maxima encountered a Lisp error: SIMPLE−ERROR: Console interrupt.Automatically continuing.To enable the Lisp debugger set *debugger−hook* to nil. assume(y<1); (%o15) [y<1] integrate(integrate(sqrt(1-(x+y)^2),x,0,1-y),y,0,1); (%o16) 13 Feladat A metszet a tengelyekkel párhuzamos síkokkal négyzet. assume(R>0); (%o63) [R>0] integrate(4*(R^2-z^2),z,-R,R); (%o64) 16*R33 Közelítő számítások Feladat f(x):=exp(-x^2); (%o39) f

x

:=exp

−x2

Beépített eljárásssal: quad_qag(f(x),x,0,1,3); (%o40) [0.7468241328124269,8.291413475940724*10−15,31,0] %[1]; (%o41) 0.7468241328124269 Hibabecslésekhez a maximális derivált korlátok: f2:diff(f(x),x,2); (%o42) 4*x2*%e−x2−2*%e−x2 f3:diff(f2,x); (%o8) 12*x*%e−x2−8*x3*%e−x2 solve(f3,x); (%o9) [x=−32,x=32,x=0] k:subst(0,x,f2); (%o10) −2 K:subst(1,x,f2); (%o11) 2*%e−1 Ma2:2; (%o17) 2 for n:0 thru 15 do ( print(n),print(float(Ma2/12/2^(2*n))) )$ 0 0.1666666666666666 1 0.04166666666666666 2 0.01041666666666666 3 0.002604166666666666 4 6.510416666666666*10−4 5 1.627604166666666*10−4 6 4.069010416666666*10−5 7 1.017252604166666*10−5 8 2.543131510416666*10−6 9 6.357828776041666*10−7 10 1.589457194010416*10−7 11 3.973642985026041*10−8 12 9.934107462565104*10−9 13 2.483526865641276*10−9 14 6.20881716410319*10−10 15 1.552204291025797*10−10 float(%), numer; (%o29) done f4:diff(f3,x); (%o18) 16*x4*%e−x2−48*x2*%e−x2+12*%e−x2 f5:diff(f4,x); (%o19) −32*x5*%e−x2+160*x3*%e−x2−120*x*%e−x2 L:solve(f5,x); (%o22) [x=−10+52,x=10+52,x=−5−102,x=5−102,x=0] float(%), numer; (%o23) [x=−2.020182870456085,x=2.020182870456085,x=−0.9585724646138183,x=0.9585724646138183,x=0.0] subst(rhs(L[5]),x,f4); (%o24) 12 subst(0,x,f4); (%o25) 12 subst(1,x,f4); (%o26) −20*%e−1 Ma4:12; (%o27) 12 for n:0 thru 10 do ( print(n),print(float(Ma4/2880/2^(4*n))) )$ 0 0.004166666666666667 1 2.604166666666666*10−4 2 1.627604166666666*10−5 3 1.017252604166666*10−6 4 6.357828776041667*10−8 5 3.973642985026042*10−9 6 2.483526865641276*10−10 7 1.552204291025797*10−11 8 9.701276818911235*10−13 9 6.063298011819522*10−14 10 3.789561257387201*10−15 Érintő formulával: for n:0 thru 15 do ( I:0.0, for k:1 thru 2^n do I:I+f((k-1/2)/2^n)/2^n, print(n), print(float(I)) )$ 0 0.7788007830714049 1 0.7545979437721995 2 0.7487471318910092 3 0.7473035787307478 4 0.7469439125163669 5 0.7468540726233616 6 0.7468316174454077 7 0.7468260039506868 8 0.7468246005957434 9 0.7468242497581783 10 0.7468241620488597 11 0.7468241401215361 12 0.7468241346397038 13 0.7468241332692487 14 0.7468241329266313 15 0.7468241328409763 Trapéz formulával: for n:0 thru 15 do ( I:0.0, for k:1 thru 2^n do I:I+(f((k-1)/2^n)+f(k/2^n))/2/2^n, print(n), print(float(I)) )$ 0 0.6839397205857212 1 0.7313702518285631 2 0.7429840978003812 3 0.7458656148456953 4 0.7465845967882215 5 0.746764254652294 6 0.7468091636378277 7 0.746820390541618 8 0.7468231972461523 9 0.7468238989209473 10 0.7468240743395621 11 0.74682411819421 12 0.7468241291578748 13 0.7468241318987853 14 0.746824132584015 15 0.7468241327553222 Simpson formulával: for n:0 thru 7 do ( I:0.0, for k:1 thru 2^n do I:I+(f((k-1)/2^n)+4*f((k-1/2)/2^n)+ f(k/2^n))/6/2^n, print(n), print(float(I)) )$ 0 0.7471804289095103 1 0.7468553797909874 2 0.7468261205274666 3 0.7468242574357303 4 0.7468241406069852 5 0.7468241332996723 6 0.7468241328428813 7 0.7468241328143305 Egyenletmegoldás iterációval T(x):=(η+x)/(1+x); (%o68) T

x

:=η+x1+x
η:2; (%o76) 2 float(%), numer; (%o77) 2.0 T(1); (%o79) 32 float(%), numer; (%o80) 1.5 T(%); (%o81) 1.4 T(%); (%o82) 1.416666666666666 T(%); (%o84) 1.413793103448275 T(%); (%o85) 1.414285714285714 sqrt(2); (%o17) 2 float(%), numer; (%o18) 1.414213562373095 Newton-módszer N(x,f,fp):=rectform(x-f(x)/fp(x)); (%o29) N

x,f,fp

:=#{Lisp function}

x−f

x

fp

x

Nr(x,f,fp,σ,Ï):=block([α,Δ,c], α:1, Δ:rectform(-f(x)/fp(x)), c:abs(f(x)), while (abs(f(x+α*Δ))-c)/α/c>-(1-σ) do α:α*Ï, rectform(x+α*Δ) )$ x:'x; (%o194) x f(x):=x^5-4*x+2; (%o195) f

x

:=x5−4*x+2
fp(x):=5*x^4-4; (%o196) fp

x

:=5*x4−4
x0:1+0.1*%i; abs(f(%)); (%o84) 0.1*%i+1(%o85) 1.103178158821139 N(x0,f,fp); abs(f(%)); (%o86) 1.134202334213555−0.4078238711532344*%i(%o87) 3.059542350716905 x1:Nr(x0,f,fp,0.1,0.5); abs(f(%)); (%o88) 0.08413050402646144*%i+1.004193822944173(%o89) 1.070450199922594 N(x1,f,fp); abs(f(%)); (%o90) 1.220938885636546−0.4350273056209306*%i(%o91) 3.882832846672741 x2:Nr(x1,f,fp,0.1,0.5); abs(f(%)); (%o92) 0.05168314092349943*%i+1.017740389362446(%o93) 1.009544788419713 N(x2,f,fp); abs(f(%)); (%o96) 1.448281658999565−0.3674052346890271*%i(%o97) 5.749515260686018 x3:Nr(x2,f,fp,0.1,0.5); abs(f(%)); (%o98) 1.125375706771726−0.0530889529796322*%i(%o99) 0.7663503381059494 N(x3,f,fp); abs(f(%)); (%o100) 0.05719351604946435*%i+1.271071977786184(%o101) 0.5408834721524442 x4:Nr(x3,f,fp,0.1,0.5); abs(f(%)); (%o102) 0.002052281534916073*%i+1.198223842278955(%o103) 0.3232678114699931 N(x4,f,fp); abs(f(%)); (%o104) 1.249412233266747−5.731754227818607*10−4*%i(%o105) 0.04716816669166247 x5:Nr(x4,f,fp,0.1,0.5); abs(f(%)); (%o106) 7.39553056067106*10−4*%i+1.223818037772851(%o107) 0.1501122144366815 N(x5,f,fp); abs(f(%)); (%o108) 1.244604621470829−7.80994652408802*10−5*%i(%o109) 0.008067977336714225 x6:Nr(x5,f,fp,0.1,0.5); abs(f(%)); (%o110) 1.244604621470829−7.80994652408802*10−5*%i(%o111) 0.008067977336714225 N(x6,f,fp); abs(f(%)); (%o112) 1.243598824480878−3.787206091177757*10−7*%i(%o113) 1.960421356949842*10−5 x7:Nr(x6,f,fp,0.1,0.5); abs(f(%)); (%o114) 1.243598824480878−3.787206091177757*10−7*%i(%o115) 1.960421356949842*10−5 Feladat f:x^2-a; (%o1) x2−a x-f/diff(f,x); (%o71) x−x2−a2*x ratsimp(%); (%o72) x2+a2*x (x+a/x)/2; (%o73) x+ax2 Feladat k:'k; (%o75) k f:x^k-a; (%o76) xk−a x-f/diff(f,x); (%o77) x−x1−k*

xk−a

k
ratsimp(%); (%o78)

k−1

*xk+1+a*x
k*xk
expand(%); (%o79) a*x1−kk−xk+x (a/x^(k-1)+(k-1)*x)/k; (%o80) a*x1−k+

k−1

*x
k
Feladat x:'x; (%o197) x f(x):=x^5-4*x+2; (%o198) f

x

:=x5−4*x+2
fp(x):=5*x^4-4; (%o199) fp

x

:=5*x4−4
x:1.24+.01*%i; abs(f(%)); (%o165) 0.01*%i+1.24(%o166) 0.08385389706174175 x:Nr(x,f,fp,0.1,0.5); abs(f(%)); (%o167) 1.243378022793557−1.687199010327999*10−4*%i(%o168) 0.002195109699282538 x:Nr(x,f,fp,0.1,0.5); abs(f(%)); (%o169) 1.782143998430507*10−7*%i+1.243596436950119(%o170) 1.46561289424419*10−6 x:Nr(x,f,fp,0.1,0.5); abs(f(%)); (%o171) 3.994498810803266*10−14*%i+1.243596390573471(%o172) 6.520717191772579*10−13 Leválasztjuk a gyöktényezőt a talált gyökkel és megoldjuk a maradék egyenletet x:'x; (%o200) x divide(x^5-4*x+2,x-1.24359639,x); rat: replaced −1.24359639 by −26355838/21193241 = −1.24359639(%o201) [201738834298729840820237614561*x4+250881686056708706819498239598*x3+311995559097236401460455757764*x2+387996550989354995047465149752*x−324444227052106379935845582708201738834298729840820237614561,−195164382875657296855548849024275499734352047510394933442656382201] f1:expand(%[1]); (%o202) x4+26355838*x321193241+694630196682244*x2449153464084081+18307560933665360340472*x9519017610318772896521−324444227052106379935845582708201738834298729840820237614561 sol:solve(f1,x); (%o210) [x=−68653353501245101276770*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
21193241*1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
−

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
+48583529449109025259203567435681815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−17365754917056101347460392252243
2
−1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
2694920784504486*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
−1317791942386482,x=68653353501245101276770*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
21193241*1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
−

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
+48583529449109025259203567435681815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−17365754917056101347460392252243
2
−1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
2694920784504486*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
−1317791942386482,x=−−68653353501245101276770*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
21193241*1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
−

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
+48583529449109025259203567435681815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−17365754917056101347460392252243
2
+1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
2694920784504486*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
−1317791942386482,x=−68653353501245101276770*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
21193241*1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
−

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
+48583529449109025259203567435681815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−17365754917056101347460392252243
2
+1815649508688568567382138531049*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

23
−1169983346614636505476709091615*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

13
−4858352944910902525920356743568
2694920784504486*

8*10741464258482332653165934480149406544846847255290002939027607615735099537347558051886041990611696265558921731249829629176388173903441*332+84224649115152246977503257297749740587951547602446515799170090886743745399987762480695392907

16
−1317791942386482]
float(%), numer; (%o211) [x=−1.51851215298702,x=0.5084994859025812,x=−1.438447695427096*

−1

0.5
−0.1167918614577806,x=1.438447695427096*

−1

0.5
−0.1167918614577806]
x:%[4]; (%o212) x=1.438447695427096*

−1

0.5
−0.1167918614577806
rectform(%); (%o213) x=1.438447695427096*%i*sin

0.5*%pi

+1.438447695427096*cos

0.5*%pi

−0.1167918614577806
exponentialize(%); (%o214) x=1.438447695427096*%i−0.1167918614577806 Pontosítjuk a gyököket. Az utolsó gyökre: x:rhs(%); abs(f(%)); (%o215) 1.438447695427096*%i−0.1167918614577806(%o216) 4.564709943368712*10−9 x:Nr(x,f,fp,0.1,0.5); abs(f(%)); (%o217) 1.438447695329177*%i−0.116791861222982(%o218) 8.881784197001253*10−16 Differenciálegyenletek ElsÅ‘rendű szeparábilis differenciálegyenletek megoldása Megjegyzés ElsÅ‘rendű lineáris differenciálegyenletek megoldása Másodrendű lineáris differenciálegyenletek Tétel Ãllítás A próbafüggvények módszere Hatványsorok alkalmazása differenciálegyenletek megoldására Feladat x:'x; c:'c; (%o226) x(%o227) c (1) szeparábilis, lineáris integrate(1/y,y)=integrate(-2*x,x)+c; (%o86) log

y

=c−x2
solve(%,y); (%o87) [y=%ec−x2] 'diff(y,x)+2*x*y=0; (%o95) dd*x*y+2*x*y=0 ode2(%,y,x); (%o96) y=%c*%e−x2 f:-2*x; g:0; (%o128) −2*x(%o129) 0 F:integrate(f,x); (%o130) −x2 y:c*%e^%; (%o131) c*%e−x2 (2) szeparábilis, lineáris f:2*cot(x); (%o132) 2*cot

x

F:integrate(f,x); (%o133) 2*log

sin

x

y:c*%e^%; (%o134) c*sin

x

2
(3) lineáris f:x; (%o135) x F:integrate(f,x); (%o136) x22 g:x^3; (%o137) x3 y:%e^F*(c+integrate(g*%e^(-F),x)); (%o139)

−2*x2−4

*%e−x222+c

*%ex22
ratsimp(%); (%o140) c*%ex22−x2−2 (4) lineáris f:1; (%o228) 1 F:integrate(f,x); (%o229) x g:exp(-x); (%o230) %e−x y:%e^F*(c+integrate(g*%e^(-F),x)); (%o231)

c−%e−2*x2

*%ex
(5) lineáris f:1/x; (%o236) 1x F:integrate(f,x); (%o237) log

x

g:x^2+3*x-2; (%o238) x2+3*x−2 y:%e^F*(c+integrate(g*%e^(-F),x)); (%o239) x*

−2*log

x

+x2+6*x2+c

(6) lineáris f:tan(x); (%o240) tan

x

F:integrate(f,x); (%o241) log

sec

x

g:1; (%o242) 1 y:%e^F*(c+integrate(g*%e^(-F),x)); (%o243) sec

x

*

sin

x

+c

Feladat (1/1) x:'x; y:'y; (%o246) x(%o247) y integrate(1/y^2,y) =integrate(1,x)+c; (%o248) −1y=x+c (1/2) integrate(1/(log(y)*y),y) =integrate(1/x,x)+c; (%o249) log

log

y

=log

x

+c
logabs:true; (%o253) true integrate(1/(log(y)*y),y) =integrate(1/x,x)+c; (%o254) log

log

y

=log

x

+c
(1/3) integrate(exp(-y),y) =integrate(exp(-x),x)+c; (%o255) −%e−y=c−%e−x (1/4) integrate(1/(1+y^2),y) =integrate(-1/x,x)+c; (%o256) atan

y

=c−log

x

(1/5) integrate(1/(y^2+3*y-4),y) =integrate(1,x)+c; (%o263) log

y−1

5
−log

y+4

5
=x+c
(2/1) integrate(1/(y^2+1),y) =integrate(1,x)+c; (%o264) atan

y

=x+c
(2/2) integrate(1/(1+exp(-y)),y) =integrate(exp(x),x)+c; (%o261) log

%e−y+1

+y=%ex+c
(2/3) integrate(y,y) =integrate(exp(x)/(exp(x)+1),x)+c; (%o259) y22=log

%ex+1

+c
(2/4) integrate(y/sqrt(1-y^2),y) =integrate(-x/sqrt(1-x^2),x)+c; (%o265) −1−y2=1−x2+c Feladat (1) kill(all); (%o0) done z=y-x; (%o6) z=y−x %+x; (%o7) z+x=y integrate(1/(z^2-1),z) =integrate(1,x)+c; (%o9) log

z−1

2
−log

z+1

2
=x+c
(2) z=y-2*x; (%o10) z=y−2*x %+2*x; (%o11) z+2*x=y integrate(1/(sqrt(z)-2),z) =integrate(1,x)+c; (%o12) 2*

z−2

+4*log

z−2

=x+c
(3) z=y/x; (%o13) z=yx %*x; (%o14) x*z=y diff(x*z(x),x); (%o16) x*

dd*x*z

x

+z

x

x*(x*zp+z)=x*z-x*cos(z)^2; (%o17) x*

x*zp+z

=x*z−x*cos

z

2
%/x; (%o18) x*zp+z=x*z−x*cos

z

2
x
ratsimp(%); (%o19) x*zp+z=z−cos

z

2
%-z; (%o20) x*zp=−cos

z

2
integrate(1/cos(z)^2,z) =integrate(-1/x,x)+c; (%o21) tan

z

=c−log

x

(4) z=y/x; %*x; diff(x*z(x),x); x*sin(z)-x*z*cos(z)+x*(x*zp+z)*cos(z) =0; (%o25) x*cos

z

*

x*zp+z

+x*sin

z

−x*z*cos

z

=0
%/x; (%o26) x*cos

z

*

x*zp+z

+x*sin

z

−x*z*cos

z

x
=0
ratsimp(%); (%o27) x*cos

z

*zp+sin

z

=0
%/cos(z); (%o28) x*cos

z

*zp+sin

z

cos

z

=0
integrate(1/tan(z),z) =integrate(-1/x,x)+c; (%o30) log

sin

z

=c−log

x

Feladat (1/1) λ^2+1=0; (%o31) λ2+1=0 solve(%,λ); (%o32) [λ=−%i,λ=%i] 'diff(y,x,2)+y=0; (%o33) d2d*x2*y+y=0 ode2(%,y,x); (%o34) y=%k1*sin

x

+%k2*cos

x

(1/2) λ^2-5*λ+6=0; (%o35) λ2−5*λ+6=0 solve(%,λ); (%o36) [λ=3,λ=2] 'diff(y,x,2)-5*'diff(y,x)+6*y=0; (%o37) d2d*x2*y−5*

dd*x*y

+6*y=0
ode2(%,y,x); (%o38) y=%k1*%e3*x+%k2*%e2*x (1/3) λ^2-λ-6=0; (%o39) λ2−λ−6=0 solve(%,λ); (%o40) [λ=3,λ=−2] 'diff(y,x,2)-'diff(y,x)-6*y=0; (%o41) d2d*x2*y−dd*x*y−6*y=0 ode2(%,y,x); (%o42) y=%k1*%e3*x+%k2*%e−2*x (1/4) 4*λ^2+4*λ+37=0; (%o43) 4*λ2+4*λ+37=0 solve(%,λ); (%o44) [λ=−6*%i+12,λ=6*%i−12] 4*'diff(y,x,2)+4*'diff(y,x)+37*y=0; (%o45) 4*

d2d*x2*y

+4*

dd*x*y

+37*y=0
ode2(%,y,x); (%o46) y=%e−x2*

%k1*sin

3*x

+%k2*cos

3*x

(2/1) de:'diff(y,x)*cos(x)+y*sin(x)=1; (%o51) cos

x

*

dd*x*y

+sin

x

*y=1
ode2(%,y,x); (%o52) y=cos

x

*

tan

x

+%c

logabs:false; (%o53) false ode2(de,y,x); (%o54) y=cos

x

*

tan

x

+%c

(2/2) λ^2+2*λ+1=0; (%o55) λ2+2*λ+1=0 solve(%,λ); (%o56) [λ=−1] 'diff(y,x,2)+2*'diff(y,x)+y=sin(x); (%o57) d2d*x2*y+2*

dd*x*y

+y=sin

x

ode2(%,y,x); (%o58) y=

%k2*x+%k1

*%e−x−cos

x

2
(2/3) λ^2-1=0; (%o59) λ2−1=0 solve(%,λ); (%o60) [λ=−1,λ=1] 'diff(y,x,2)-y=exp(x)*(2*x+3); (%o61) d2d*x2*y−y=

2*x+3

*%ex
ode2(%,y,x); (%o62) y=

x2+2*x−1

*%ex
2
+%k1*%ex+%k2*%e−x
(2/4) λ^2-3*λ+2=0; (%o64) λ2−3*λ+2=0 solve(%,λ); (%o65) [λ=1,λ=2] 'diff(y,x,2)-3*'diff(y,x)+2*y =3*exp(2*x); (%o66) d2d*x2*y−3*

dd*x*y

+2*y=3*%e2*x
ode2(%,y,x); (%o67) y=

3*x−3

*%e2*x+%k1*%e2*x+%k2*%ex
Feladat (1) yp:integrate((1-x^2)^(-1/2),x)+c1; (%o70) asin

x

+c1
y=integrate(%,x)+c0; (%o71) y=x*asin

x

+1−x2+c1*x+c0
(2) yp:'yp; (%o80) yp 'diff(yp,x)*2*x-yp=0; (%o81) 2*x*

dd*x*yp

−yp=0
ode2(%,yp,x); (%o82) yp=%c*%elog

x

2
y=integrate(rhs(%),x)+c; (%o83) y=2*%c*%e3*log

x

2
3
+c
Feladat (1) 'diff(v,t)=-c*v^2; (%o119) dd*t*v=−c*v2 ode2(%,v,t); (%o120) 1c*v=t+%c ic1(%,v=v0,t=0); (%o121) 1c*v=c*t*v0+1c*v0 sol:solve(%,v); (%o122) [v=v0c*t*v0+1] assume(c*v0>0); (%o123) [redundant] integrate(rhs(sol[1]),t,0,inf); defint: integral is divergent. −− an error. To debug this try: debugmode(true); (2) t:'t; (%o142) t 'diff(v,t)=-c*v; (%o143) dd*t*v=−c*v ode2(%,v,t); (%o144) v=%c*%e−c*t sol:ic1(%,v=v0,t=0); (%o145) v=%e−c*t*v0 assume(c>0); (%o150) [c>0] integrate(exp(-c*t)*v0,t,0,inf); (%o151) v0c Feladat A metszéspont (x0/2,0), így egyenes. Feladat integrate(1/(t^2+1)^(1/3),t,y0,y)=integrate(1/(t^4+1)^(1/3),t,x0,x); (%o1) y0y1

t2+1

13
dt
=x0x1

t4+1

13
dt
Ha x->+-inf, akkor a jobb oldal határértéke véges. A bal oldali integrál divergens, így y véges kell legyen, ha x->+-inf. Feladat y:x*exp(x^2)*(c+integrate(exp(-t^2),t,-inf,x)); (%o4) x*%ex2*

%pi*erf

x

2+c+%pi2

A határérték csak akkor lehet véges, ha a zárójelben álló kifejezés nullához tart. limit(erf(x),x,inf); (%o5) 1 subst(-sqrt(%pi),c,y); (%o8) x*%ex2*

%pi*erf

x

2−%pi2

limit((sqrt(%pi)/2*(erf(x)-1))/(exp(-x^2)/x),x,inf); (%o9) %pi*

limx→infx*%ex2*

erf

x

−1

2
a:sqrt(%pi)/2*(erf(x)-1); (%o1) %pi*

erf

x

−1

2
ad:diff(a,x); (%o2) %e−x2 b:exp(-x^2)/x; (%o3) %e−x2x bd:diff(b,x); (%o4) −%e−x2x2−2*%e−x2 ad/bd; (%o6) %e−x2−%e−x2x2−2*%e−x2 ratsimp(%); (%o7) −x22*x2+1 limit(%,x,inf); (%o8) −12 Feladat Feladat Differenciálegyenletek közelítő megoldása Feladat Mindent úgy írunk meg, hogy egyenletrendszerre is működjön. Ezért x lista. Az első koordináta φ, a második a deriváltja, az ω szögsebesség. A lengésidő kis kitérésekre 2π(l/g)^(1/2)=2.0066... Elliptikus integrálokkal pontosan kiszámítható, értéke 2.1529... kill(all); (%o0) done x:[%pi/3,0]; (%o1) [%pi3,0] x:float(%), numer; (%o2) [1.047197551196597,0.0] g:9.81; l:1; (%o3) 9.81(%o4) 1 Ez a függvény. Kipróbáljuk. f(t,x):=block([y],y:copylist(x),y[1]:x[2], y[2]:-g/l*sin(x[1]),return(y)); (%o5) f

t,x

:=block

[y],y:copylist

x

,y1:x2,y2:−gl*sin

x1

,return

y

f(0,x); (%o6) [0.0,−8.495709211125343] Az Euler-módszer egy lépése. A lépésköz h. A függvény is paraméter, így tetszőleges egyenletrendszerre működik. Ki is próbáljuk. odeeuler(t,h,x,f):=x+h*f(t,x)$ x:odeeuler(0,0.1,x,f); (%o8) [1.047197551196597,−0.8495709211125343] x:odeeuler(.1,.1,x,f); (%o9) [0.9622404590853442,−1.699141842225068] x:odeeuler(.2,.1,x,f); (%o10) [0.7923262748628372,−2.504027286759101] x:odeeuler(.3,.1,x,f); (%o11) [0.5419235461869272,−3.202488188263706] x:odeeuler(.4,.1,x,f); (%o12) [0.2216747273605565,−3.708473157250889] x:odeeuler(.5,.1,x,f); (%o13) [−0.1491725883645325,−3.924159425801368] x:odeeuler(.6,.1,x,f); (%o14) [−0.5415885309446693,−3.778363244336193] x:odeeuler(.7,.1,x,f); (%o15) [−0.9194248553782887,−3.272659864111559] x:odeeuler(.8,.1,x,f); (%o16) [−1.246690841789444,−2.492516617880831] x:odeeuler(.9,.1,x,f); (%o17) [−1.495942503577527,−1.562591427642996] Fárasztó lenne minden lépést kíirni. A keretprogram n lépést tesz. Paraméterként kapja az eljárást. iter(t0,h,x,n,f,proc):=block([i,t,xx], t:t0, m:matrix(cons(t,x)), xx:copylist(x), for i:n step -1 while i>0 do ( t:t+h, xx:proc(t,h,xx,f), m:addrow(m,cons(t,xx)) ), return(m))$ Számolások az Euler-módszerrel. x:float([%pi/3,0]),numer; (%o35) [1.047197551196597,0.0] M:iter(0,.1,x,6,f,odeeuler); (%o36) 01.0471975511965970.00.11.047197551196597−0.84957092111253430.20.9622404590853442−1.6991418422250680.30.7923262748628372−2.5040272867591010.40.5419235461869272−3.2024881882637060.50.2216747273605565−3.7084731572508890.6−0.1491725883645325−3.924159425801368 m:matrix_size(M)[1]; (%o37) 7 A zérushely idejét egy Newton-iterációs lépéssel közelítjük. Ennek négyszerese a periódusidő. TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o38) 2.24794441593405 T:TT; (%o39) 2.24794441593405 M:iter(0,.1/2,x,11,f,odeeuler); (%o40) 01.0471975511965970.00.051.047197551196597−0.42478546055626710.11.025958278168784−0.84957092111253430.150.9834797321131577−1.2690520333946610.20.9200271304434246−1.6773592563186230.250.8361591676274934−2.0676099127439710.30.7327786719902949−2.4315972200280750.350.6111988109888911−2.7597111388855350.39999999999999990.4732132540446142−3.041184392832680.44999999999999990.3211540344029802−3.2647291683599970.49999999999999990.1579175759849803−3.4195612818647020.5499999999999999−0.01306048810825483−3.496698310942641 m:matrix_size(M)[1]; (%o41) 12 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o42) 2.185059634035474 Extrapolálunk TTT:TT+(TT-T); (%o43) 2.122174852136899 M:iter(0,.1/4,x,22,f,odeeuler); (%o44) 01.0471975511965970.00.0251.047197551196597−0.21239273027813350.051.041887732939644−0.42478546055626710.075000000000000011.031268096425737−0.63652408331892320.11.015354994342764−0.84693660031886240.1250.9941815793347931−1.0553176283495920.150.9677986386260533−1.2609139045724840.1750.9362757910117412−1.4629114397330210.19999999999999990.8997030050184156−1.6604250015086650.22499999999999990.858192379980699−1.8524906407839760.24999999999999990.8118801139610996−2.0380619880405170.27499999999999990.7609285642600867−2.2160110297325090.30.705528288516774−2.3851340084653340.3250.6458999383051406−2.5441629594702560.350.5822958643183842−2.6917831859905710.3750.5150012846686199−2.8266566811222160.40000000000000010.4443348676405645−2.9474511270469810.42500000000000010.37064858946439−3.0528736616480770.45000000000000010.2943267479231881−3.1417081297827390.47500000000000010.2157840446786195−3.2128540794231220.50000000000000010.1354626926930415−3.2653653799306710.52500000000000010.05382855819477472−3.2984860930759730.5500000000000002−0.02863359413212463−3.31168117266459 T:TT; (%o45) 2.185059634035474 m:matrix_size(M)[1]; (%o46) 23 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o47) 2.165415035277583 TTT:TT+(TT-T); (%o48) 2.145770436519692 T:TT; (%o49) 2.165415035277583 M:iter(0,.1/8,x,44,f,odeeuler); (%o50) 01.0471975511965970.00.01251.047197551196597−0.10619636513906670.0251.045870096632359−0.21239273027813350.03751.043215187503882−0.31850761231694860.051.03923384234992−0.42445896733281580.06251.03392810525826−0.53016369523041240.0751.02730105906788−0.63553715204588970.08751.019356844667306−0.74049267469171610.09999999999999991.01010068623366−0.84494112301306880.11249999999999990.9995389221959969−0.94879044413083540.12499999999999990.9876790416443615−1.0519452641639950.13749999999999990.9745297258423116−1.1543065125470620.150.9601008944354733−1.2557710842763630.16250.9444037558820188−1.3562315455205560.1750.9274508615630118−1.4555758881027660.18750.9092561629617273−1.5536873383895180.20.8898350712318583−1.6504442260898160.21250.8692045184057357−1.7457199183599390.2250.8473830194262364−1.8393828244093360.23750.8243907341211196−1.9312964754942590.250.8002495281774414−2.0213196847530020.26250.7749830321180289−2.10930679076630.27500000000000010.7486166972334502−2.1951079880071050.28750000000000010.7211778473833613−2.2785697464677080.30000000000000010.692695725552515−2.3595353217150130.31250000000000010.6632015340310774−2.437845355427880.32500000000000010.6327284670882289−2.5133385651207170.33750000000000010.60131173502422−2.5858525202684240.35000000000000010.5689885785208647−2.6552245004399070.36250000000000010.5357982722653658−2.7212924293484580.37500000000000010.50178211689851−2.7838958769726610.38750000000000020.4669834184363517−2.842877120133170.40000000000000020.4314474544346871−2.8980822501771040.41250000000000020.3952214263074733−2.9493623147762750.42500000000000020.3583543973727698−2.9965744793446930.43750000000000020.3208972163809612−3.0395831922829540.45000000000000020.2829024264774242−3.0782613372192150.46250000000000020.244424159762184−3.1124913546921980.47500000000000020.2055180178285315−3.14216631535810.48750000000000020.1662409388865553−3.1671909268388210.50000000000000020.12665105230107−3.1874824567901250.51250000000000020.08680752159119348−3.2029715556684340.52500000000000010.04677037714533805−3.2136029640115450.53750000000000010.006600340095193731−3.2193360908033770.55−0.03364136103984849−3.220145451630955 m:matrix_size(M)[1]; (%o51) 45 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o52) 2.1582113770385 TTT:TT+(TT-T); (%o53) 2.151007718799417 Megírjuk a Heun módszert is. kill(all); (%o0) done odeheun(t,h,x,f):=block([k,kk], k:f(t,x), kk:f(t+h,x+h*k), return(x+h/2*(k+kk)) )$ Számolások a Heun-módszerrel. x:[%pi/3,0]; (%o2) [%pi3,0] x:float(%), numer; (%o3) [1.047197551196597,0.0] g:9.81; l:1; (%o4) 9.81(%o5) 1 f(t,x):=block([y],y:copylist(x),y[1]:x[2], y[2]:-g/l*sin(x[1]),return(y)); (%o6) f

t,x

:=block

[y],y:copylist

x

,y1:x2,y2:−gl*sin

x1

,return

y

iter(t0,h,x,n,f,proc):=block([i,t,xx], t:t0, m:matrix(cons(t,x)), xx:copylist(x), for i:n step -1 while i>0 do ( t:t+h, xx:proc(t,h,xx,f), m:addrow(m,cons(t,xx)) ), return(m))$ M:iter(0,.1,x,6,f,odeheun)$ m:matrix_size(M)[1]; (%o9) 7 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o10) 2.12097465623106 T:TT; (%o11) 2.12097465623106 M:iter(0,.1/2,x,11,f,odeheun)$ m:matrix_size(M)[1]; (%o13) 12 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o14) 2.146634208143215 TTT:TT+(TT-T)/3; (%o15) 2.155187392113933 T:TT; (%o16) 2.146634208143215 M:iter(0,.1/4,x,22,f,odeheun)$ m:matrix_size(M)[1]; (%o18) 23 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o19) 2.151298531452661 TTT:TT+(TT-T)/3; (%o20) 2.152853305889143 T:TT; (%o21) 2.151298531452661 M:iter(0,.1/8,x,44,f,odeheun)$ m:matrix_size(M)[1]; (%o23) 45 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o24) 2.152465229258917 TTT:TT+(TT-T)/3; (%o25) 2.152854128527669 Megírjuk a trapézmódszert is. Mindig három iterációt végzünk az egyszerűség kedvéért. kill(all); (%o0) done odetrapez(t,h,x,f):=block([xx,k,kk],k:f(t,x), kk:f(t+h,x+h*k),xx:x+h/2*(k+kk), kk:f(t+h,xx),xx:x+h/2*(k+kk), kk:f(t+h,xx),xx:x+h/2*(k+kk), kk:f(t+h,xx),xx:x+h/2*(k+kk),return(xx))$ Számolások a trapéz módszerrel. x:[%pi/3,0]; (%o2) [%pi3,0] x:float(%), numer; (%o3) [1.047197551196597,0.0] g:9.81; l:1; (%o4) 9.81(%o5) 1 f(t,x):=block([y],y:copylist(x),y[1]:x[2], y[2]:-g/l*sin(x[1]),return(y)); (%o6) f

t,x

:=block

[y],y:copylist

x

,y1:x2,y2:−gl*sin

x1

,return

y

iter(t0,h,x,n,f,proc):=block([i,t,xx], t:t0, m:matrix(cons(t,x)), xx:copylist(x), for i:n step -1 while i>0 do ( t:t+h, xx:proc(t,h,xx,f), m:addrow(m,cons(t,xx)) ), return(m))$ M:iter(0,.1,x,6,f,odetrapez)$ m:matrix_size(M)[1]; (%o9) 7 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o10) 2.16733603142249 T:TT; (%o11) 2.16733603142249 M:iter(0,.1/2,x,11,f,odetrapez)$ m:matrix_size(M)[1]; (%o13) 12 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o14) 2.156732324672872 TTT:TT+(TT-T)/3; (%o15) 2.153197755756333 T:TT; (%o16) 2.156732324672872 M:iter(0,.1/4,x,22,f,odetrapez)$ m:matrix_size(M)[1]; (%o18) 23 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o19) 2.153825492798304 TTT:TT+(TT-T)/3; (%o20) 2.152856548840114 T:TT; (%o21) 2.153825492798304 M:iter(0,.1/8,x,44,f,odetrapez)$ m:matrix_size(M)[1]; (%o23) 45 TT:4*(M[m][1]-M[m][2]/M[m][3]); (%o24) 2.153096484430312 TTT:TT+(TT-T)/3; (%o25) 2.152853481640982 A prediktor-korrektor módszer megegyezik a trapéz módszerrel, ha három iterációt végzünk. Feladat Generátorfüggvények Variációszámítás Integrálkritérium facts(); (%o144) [R>0] assume(a<-1); (%o1) [a<−1] integrate(log(x)^a/x,x); (%o2) log

x

a+1
a+1
forget(a<-1); (%o3) [a<−1] assume(a>-1); (%o4) [a>−1] integrate(log(x)^a/x,x); (%o6) log

x

a+1
a+1
integrate(log(x)/x,x); (%o8) log

x

2
2
integrate(log(log(x))^a/x/log(x),x); (%o11) log

log

x

a+1a+1
integrate(log(log(x))/x/log(x),x); (%o10) log

log

x

22
Feladat Feladat
PKÚclXñB–HmimetypePKÚclXQdBV55 5format.txtPKÚclXlà³$Q$Q ’content.xmlPK§ßW