(%i1) /* 47. 1. feladat. Ez egy megjegyzes. */ /* y'=5x**(-4)-(5*x)**(-3)+(1*x+9)**(1/9), y(0.2)=0.3. Mennyi y(1)? */ /* **: hatvanyozas */ /* yy: int... jelentese: yy legyen egyenlo int...-vel */ /* hatarozatlan integralas "C" nelkul */ yy: integrate(5*x**(-4)-(5*x)**(-3)+(1*x+9)**(1/9),x); 10/9 9 (x + 9) 1 5 (%o1) ------------- + ------ - ---- 10 2 3 250 x 3 x (%i2) /* yy(0.2) erteke. subst: substitute, helyettesits be. */ yy02: subst(x=0.2,yy); (%o2) - 197.6379207393455 (%i3) /* a hianyzo "C" erteke: */ C: 0.3-yy02; (%o3) 197.9379207393455 (%i4) /* y(x) */ y: yy+C; 10/9 9 (x + 9) 1 5 (%o4) ------------- + ------ - ---- + 197.9379207393455 10 2 3 250 x 3 x (%i5) /* y(1) */ subst(x=1,y); 1/9 (%o5) 9 10 + 196.2752540726788 (%i6) /* ugyanez tizedestortben. float: floating point number */ float(subst(x=1,y)); kill(all); (%o6) 207.8992010578128 (%i7) (%o0) done /** Ugyanez DE fuggvenyekkel. Altalanos megoldas: ( 'diff: a diff fuggveny passziv (fonev, noun) formaja. Nezd meg mennyi 'diff(y,x); , illetve diff(y,x); ! ode2: 2. rendu kozonseges (ordinary) DE. solve: megold cc[1]: a cc lista elso eleme. rhs: jobboldal, right hand side **/ y_alt: ode2('diff(y,x)=5*x**(-4)-(5*x)**(-3)+(1*x+9)**(1/9), y,x); cc: solve( subst(x=0.2, rhs(y_alt))=0.3, %c); float( subst([%c=rhs(cc[1]), x=1], rhs(y_alt)) ); /* kitoroljuk a valtozok ertekeit */ kill(all); 10/9 3 (x + 9) - 1277 25 (x + 9) 9 (--------------------------------------------------- + --------------) 3 2 2 54 (x + 9) - 1458 (x + 9) + 13122 (x + 9) - 39366 (%o1) y = ------------------------------------------------------------------------ + %c 125 (%i2) rat: replaced -197.937920739009 by -117971/596 = -197.937919463087 117971 (%o2) [%c = ------] 596 (%i3) (%o3) 207.8991997815545 (%i4) (%o0) done (%i1) /* 47. 2. feladat. */ /* y'=x*exp(5*x)-x*sin(-7*x), y(0)=2. Mennyi y(1)? */ /* **: hatvahyozas */ /* yy: int... jelentese: yy legyen egyenlo int...-vel */ /* hatarozatlan integralas "C" nelkul */ yy: integrate(x*exp(5*x)-x*sin(-7*x),x); 5 x sin(7 x) - 7 x cos(7 x) (5 x - 1) %e (%o1) ----------------------- + --------------- 49 25 (%i2) /* yy(0) erteke. subst: substitute, helyettesits be. */ yy02: subst(x=0,yy); 1 (%o2) - -- 25 (%i3) /* a hianyzo "C" erteke: */ C: 2-yy02; 51 (%o3) -- 25 (%i4) /* y(x) */ y: yy+C; 5 x sin(7 x) - 7 x cos(7 x) (5 x - 1) %e 51 (%o4) ----------------------- + --------------- + -- 49 25 25 (%i5) /* y(1) */ subst(x=1,y); 5 sin(7) - 7 cos(7) 4 %e 51 (%o5) ----------------- + ----- + -- 49 25 25 (%i6) /* kitoroljuk a valtozok ertekeit */ kill(all); (%o0) done (%i1) /** Ugyanez DE fuggvenyekkel. Altalanos megoldas: ( 'diff: a diff fuggveny passziv (fonev, noun) formaja. Nezd meg mennyi 'diff(y,x); , illetve diff(y,x); ! ode2: 2. rendu kozonseges (ordinary) DE. solve: megold **/ y_alt: ode2('diff(y,x)=x*exp(5*x)-x*sin(-7*x), y,x); cc: solve( subst(x=0, rhs(y_alt))=2, %c); float( subst([%c=rhs(cc[1]), x=1], rhs(y_alt)) ); /* kitoroljuk a valtozok ertekeit */ kill(all); 5 x sin(7 x) - 7 x cos(7 x) (5 x - 1) %e (%o1) y = ----------------------- + --------------- + %c 49 25 (%i2) 51 (%o2) [%c = --] 25 (%i3) (%o3) 25.69181302413298 (%i4) (%o0) done (%i1) /** 47. 4. feladat. Mennyi exp(x)/(exp(x)+9) hatarozott integralja x=[9,1]-en? **/ y: integrate(exp(x)/(exp(x)+9),x); megoldas: subst(x=1,y)-subst(x=9,y); float(megoldas); x (%o1) log(%e + 9) (%i2) 9 (%o2) log(%e + 9) - log(%e + 9) (%i3) (%o3) - 6.539959900144472 (%i4) /* vagy */ megoldas: integrate(exp(x)/(exp(x)+9),x,9,1); float(megoldas); 9 (%o4) log(%e + 9) - log(%e + 9) (%i5) (%o5) - 6.539959900144472 (%i6) /* kitoroljuk a valtozok ertekeit */ kill(all); (%o0) done (%i1) /** 47. 7.feladat. Forgasd meg az f = (1x)**3 , Df = [0, 3] fuggvenyt az x-tengely korul! Mennyi az igy kapott forgastest felulete? **/ f: x**3; fff: 2*%pi*f*sqrt(1+(diff(f,x))**2); intfff: integrate(fff,x); megoldas: subst(x=3,intfff)-subst(x=0,intfff); float(megoldas); 3 (%o1) x (%i2) 3 4 (%o2) 2 %pi x sqrt(9 x + 1) (%i3) 4 3/2 %pi (9 x + 1) (%o3) ----------------- 27 (%i4) 3/2 730 %pi %pi (%o4) ---------- - --- 27 27 (%i5) (%o5) 2294.818693840205 (%i6) /* vagy */ megoldas: integrate(fff,x,0,3); float(megoldas); /* kitoroljuk a valtozok ertekeit */ kill(all); 365 sqrt(730) 1 (%o6) 2 (------------- - --) %pi 27 54 (%i7) (%o7) 2294.818693840205 (%i8) (%o0) done (%i1) /** 47. 9.feladat. Integrald 6*x+6*y -t D={(x,y);1<=x<=2,3<=y<=6} -on! **/ f: 6*x+6*y; ix: integrate(f,x); ihx: subst(x=2,ix)-subst(x=1,ix); iy: integrate(ihx,y); ihy: subst(y=6,iy)-subst(y=3,iy); float(ihy); (%o1) 6 y + 6 x (%i2) 2 (%o2) 6 x y + 3 x (%i3) (%o3) 6 y + 9 (%i4) 2 (%o4) 3 y + 9 y (%i5) (%o5) 108 (%i6) (%o6) 108.0 (%i7) /* ugyanez egy lepesben */ float(integrate(integrate(f,x,1,2),y,3,6)); /* kitoroljuk a valtozok ertekeit */ kill(all); (%o7) 108.0 (%i8) (%o0) done (%i1) /** 47. 11.feladat. Mennyi exp(-4x) impropius integralja [1,+vegtelen]-en ? */ i1R: integrate(exp(-4*x),x,1,R); megoldas: limit(i1R,R,inf); float(megoldas); - 4 - 4 R %e %e (%o1) ----- - ------- 4 4 (%i2) - 4 %e (%o2) ----- 4 (%i3) (%o3) 0.0045789097221835 (%i4) /* kitoroljuk a valtozok ertekeit */ kill(all); (%o0) done (%i1)