mathematica_note

mathematica_note - ] 1 ] MATHEMATICA– >í l jX  Ð...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ] 1 ] MATHEMATICA– >í l jX  Ð ß – V1⠁‰ 1.1 5 mathematica— Nñ e × 5 Ñ 9 D © F Ä e x3 − 2x + 1 = 0_ ` ½K˜.   ¨Ð H¦ Solve[x^3 - 2 x + 1 == 0] ªË Õa 1:  ½ l > H ¨  1.2 2π 0  \P †& e x3 sin xdx_ &ì°` ½K˜. mathematica_ "§ë“ Aü °  hú ¨Ð r¯¦  îîÉ < ú Hr .  Integrate[x^3*Sin[x], {x, 0, 2*Pi}] ªË Õa 2: &ì l > r h 1.3 System of equations e ·    H  H ” €$ s e(consistent) system` Û#˜. ¦¦  QÐ 2x − 3y + 4z = 2 3x − 2y + z = 0 x+y−z = 1 6 _ “ (7/10, 9/5, 3/2)T s. Mathematica– S“K˜.  É Hr  Ð XÐ ‰ Integrate[x^3*Sin[x], {x, 0, 2*Pi}] Õa 3: Nonsingular system Ûl ªË > ¦  – ß9 ë{ systems inconsistent € Mathematica #*ô °• ا t ·>    H  Q‹ ú¸ 4 ú Ç ¯ ¦ § a  . singular“ d` {§K˜.  ” 94Ð  ¦  2x − 2y + 2z = −2 −x + y + 3z = 0 −3x + 3y − 2z = 1 sys={2x - 2y - 2z == -2, -x +y +3z==0,-3x +3y -2z ==1}; sols=Solve[sys, {x, y, z}] ªË Õa 4: Singular system Ûl > ¦  1.4 Second-Order Linear Equations 4 d2 y − y = t − 2 − 5 cos t − e−t/2 . dt2 DSolve\ 6 € ` ½½ à e. Mathematica– 6õ °s {§ ¦ x  ¦ É    H ¨+ º ”  Ð £ ú 94 §  Ð K˜. 1 ] MATHEMATICA– >í l jX  Ð ß – 7 sol1 = DSolve[4 y’’[t]- y[t]== t -2 -5Cos[t] -Exp[-t/2], y[t], t] Õo“ d` çéy K˜. ª¦ ” ßß Ð ¦ –– Simplify[sol1] ªË Õa 5: Second Order Equation > 1.5 «« « Ü8è Ühe y = sin x for −π ≤ x ≤ 2π _ ÕAá\ Õ˜.  ªÔ ª9Ð ¦ sys = {2 x - 3 y + 4 z == 2, 3 x - 2 y + z == 0, x + y - z == 1}; sols = Solve[sys, {x, y, z}] Õa 6: Sine †Ã Õol ªË > Ê <º ª s] # >_ †Ã\ ô ÕAá\  ?. j ŒQ h <º  ªԁ / Ê ¦Ç p1 = Plot[Sin[x], x, -Pi, 2 Pi] 8 p2 = Plot[ArcSin[x], x,-1, 1, PlotStyle → GrayLevel[0.3], DisplayFunction → Identity]; p3 = Plot[x, x, -Pi, 2 Pi, PlotStyle → Dashing[0.01], DisplayFunction → Identity]; ªQ £ úÉ  : Õ€ 6õ °“ õ “.  § r  r ªË Õa 7: †Ã # > Õol > Ê <º ŒQ h ª 3 x Ü8è Ühe j «« « S  ” ¶f Q ª9 Ð A_ ds 3 "\" #b> Õt ˜.  é G H f (x, y ) = x2 y . x4 + 4y 2  ¦ Ê Í :  <º ' P ×\ †Ã f (x, y )\ &_ô. ¦ Ç  ñ f[x_, y_] = x^2 y/(x^4 + 4 y^2) ª¦ ¶ ªÔ ª A £ îîQ 94 Õo“ 3 " ÕAá\ Õol 0K 6_ "§#\ {§ô. é ¦ § ¦ Ç Plot3D[f[x, y], {x, -1/2, 1/2}, {y, -1/2, 1/2}, Axes -> Automatic, Boxed -> False, PlotPoints -> {50, 50}] 1 ] MATHEMATICA– >í l jX  Ð ß – 9 ªË Õa 8: 3 " ÕAá > ¶ ªÔ é Õ€ Õas ا. s Õa\ ContourPlot` æ€ 1“‚ +I–  ªQ ªË 4  ªË  > ¦a > ¦ x A  ¼ p¦ þÐ  è Õ e. 0ü °s &_ †Ã\ ­ º¸ ” A< ú ñ <º q  aÊ ContourPlot[f[x, y], {x, -1/2, 1/2}, {y, -1/2, 1/2}, PlotPoints -> {50, 50}] ContourPlot` 6K" Õ‘. ¦x   f ª9: r ªË Õa 9: Contour ÕAá > ªÔ 10 Parametric equations Ü8è Ühe «« « T\ ›ô Parametric equations e.   aÇ  ”  x = t + sin 2t y = t + sin 3t where − 2π ≤ t ≤ 2π Mathematica– parameter\ &_ # 6 € . Ð H ¦  ñŒ    x a x[t_] = t + Sin[2 t]; y[t_] = t + Sin[3 t]; ParametricPlot[{x[t], y[t]}, {t, -2 Pi, 2 Pi}, AspectRatio -> Automatic] ªË Õa 10: Contour ÕAá > ªÔ 1.6 Nonlinear Differential EquationU"˜ Nñ c+ 5 Ñ £ ”f  1 Ð 6 d\" ` ›¹K ˜. § H¦ aÏ dx dt dy dt = x(1 − x − y ), = y (0.5 − 0.25y − 0.75x) where x and y are nonnegative. (1) 1 ] MATHEMATICA– >í l jX  Ð ß – 11 Mathematica– 0_ Å#” d` F (x, y )ü G(x, y )– &_ô. Ð A ÒQ ”  ¦ < Ð ñ Ç F[x_,y_] := x(1 - x - y) G[x_,y_] := y(0.5 - 0.25 x - 0.75 x) s] s d(algebraic equation)` Û# critical points\ ½ô. j  ”  ¦¦  Q ¦Ç  ¨ x(1 − x − y ) = 0 y (0.5 − 0.25x − 0.75y ) = 0 Õ€ critical points (0, 0), (1, 0), (0, 2) Õo“ (0.5, 0.5)s “. ªQ  H  ª¦  : r Mathematica– (the solutions of the system)` SolofSys– ¿“ Aü Ð  HH ¦  Ð º¦ < °s {§ Ê z'ô.  ú 94 ê  ´ŸÇ SolofSys = Solve[{F[x,y] ==0, G[x,y]==0},{x,y}] ·_ dܖ ó õü °“ critical points\ اô. critical points\ ½ ¡ ú ”¼Ð  < úÉ r r ¦ ¦Ç  4 ¦ ¨ ªË Õa 11: Mathematica– critical points\ ½ô õ° > Ð ¦ Ç ¯  ¨ ú ¡ •H þ¼ Œ h ƒf  Ù܀ y & %\" (linear approximated)_ —_` ›¹ . H  ¸þ 1 v¦ aÏ 7, Jacobian matrix J  ¤ £ H  −x Fx (x, y ) Fy (x, y ) 1 − 2x − y J = = Gx (x, y ) Gy (x, y ) −0.75y 0.5 − 0.5y − 0.75x (2) 12 x = 0, y = 0s€ 6 linear system` %> .  £ § ¦ a  3  d x 1 0 x = dt y 0 0.5 y (3) A”  0 d(3)_ eigenvaluesü eigenvectors` ½ €  < ¦  ¨  1 0 r1 = 1, ξ 1 = ; r2 = 0.5, ξ 2 = . 0 1 f " general solution“ r É 1 x 0 0.5t t = c1 e + c2 e 1 0 y x = 1, y = 0“ Ä, 6 linear system` %> .   ⺠£ § ¦ a  3  −1 x d x −1 = dt y 0 −0.25 y A”  0 d(6)_ eigenvaluesü eigenvectors` ½ €  < ¦  ¨  1 4 r1 = −1, ξ 1 = ; r2 = −0.25, ξ 2 = . 0 3 f " general solution“ r É x 1 −t 4 −0.25t . = c1 e + c2 e y 0 −3 (4) 1 ] MATHEMATICA– >í l jX  Ð ß – 13 x = 0, y = 2“ Ä\•, Ä > 6 linear system` %> .  ⺁¸ » £  § ¦ a  3  x −1 0 x d = dt y −1.5 −0.5 y (5) 0 d(6)_ eigenvaluesü eigenvectors` ½ € A”   < ¦  ¨  1 0 r1 = −1, ξ 1 = ; r2 = −0.5, ξ 2 = . 3 1 " general solution“ f r É 1 x 0 −0.5t −t . = c1 e + c2 e 1 3 y x = 0.5, y = 0.5“ Ä, linear system“ 6õ °.   ⺠r§ É £ ú −0.5 x d x −0.5 = dt y −0.375 −0.125 y 0 d(6)_ eigenvaluesü eigenvectors` ½ € A”   < ¦  ¨  √ 1 1 −5 + 57 r1 = 0.1594, ξ 1 = , √ 16 (−3 − 57)/8 −1.3187 √ 1 −5 − 57 1 r2 = − −0.7844, ξ 2 = . √ 16 0.5687 (−3 + 57)/8 " general solution“ f r É 1 x −0.1594t 1 −0.7844t + c2 . = c1 e e y −1.3187 0.5687 (6) 14 mathematica–• Õ˜. и ª9Ð º Ă critical points\ &_K ˜. (x0, y 0)\ ' P &(0, 0)ܖ °“ d  ¦  ñ Ð ¦    Í : h ¼Ð úÉ ” r  ¼Ð ܖ (x1, y 1)“ &(0, 2), (x2, y 2)“ &(0.5, 0.5)ܖ t} &“ (x3, y 3)“ r Éh r Éh ¼Ð Œ hÉ • r r É  h &(0, 2)ܖ &_ô. ¼Ð ñ Ç x0=SolofSys[[1,1,2]]; y0=SolofSys[[1,2,2]]; x1=SolofSys[[2,1,2]]; y1=SolofSys[[2,2,2]]; x2=SolofSys[[3,1,2]]; y2=SolofSys[[3,2,2]]; x3=SolofSys[[4,1,2]]; y3=SolofSys[[4,2,2]]; ª¦ Õo“ critical points_ |½` SSETCRs“ &_ô.  9+ ˦ ¦ ñ Ç SETCR={{x0,y0},{x1,y1},{x2,y2},{x3,y3}}; ªË Õa 12: critical pointsü Õ |½` &_ô. > < ª 9+ ñ ˦ Ç £¼Ð ˜9¼ 6ܖ 7'€×(vectorfield)\ Õ˜. 7'€×_ #0 0 ≤ §  ¦  ª9Ð ˜9¼ 3A  H x ≤ 1.5ü 0 ≤ y ≤ 2– ¿. Õa` Õo Mathematica "§ë“ A < Ð º ªË ª >¦ H Hr îîÉ  < ú ü °. Fig = VectorFieldPlot[{F[x, y], G[x, y]}, {x, 0, 1.5}, {y, 0, 2}, 1 ] MATHEMATICA– >í l jX  Ð ß – 15 Axes -> True, AxesLabel -> {x, y}, AxesOrigin -> {0, 0}, Background -> LightBlue, Epilog -> {PointSize[Large], Point[SSETCR]}, ImageMargins -> 5, PlotRange -> {{-.1, 1.6}, {-0.1, 2.1}}, Ticks -> {{0, 0.25, 0.5, 0.75, 1, 1.25, 1.5}, {0, 0.5, 1, 1.5, 2}}] Õa 13: 7'€×\ Õ‘. ªË > ˜9¼ ª9: ¦ r 16 mathematica– Critical Points Ł_ ` ¶(˜. d(2)“ Aü Ð Ò H úRÐ ” É <  ¦ ˜ r ú ß+ º ” °s >í½ Ã e. J  LMܖ &_ %. Õo“ MatrixForm`  –É  H  ¼Ð ñi ª¦  ¦  x Œ ”  6 # d` ó. ¦ r Õa 14: Jacobian` ½ô. ªË > ¦Ç  ¨ Af ¨ 0\" ½ô LM` s6 # critical point(x0, y 0)\ @{ # s '§ Ç ¦x   Œ ¦  /9Œ  > Ÿ= ¦  ` LM0 ô. Õo“ Eigensystem "§#– eigenvalueü eigenvector\   ª¦ Ç îîQÐ < ¦  ¨ Í : ú ½ . ' P õ°s eigenvalueŠs“ Qt ¿ †s eigenvectors°   ¯ œ ©¦   º ½ Ó ¯ ú    hþ¸ úÉ ½O¼Ð  ¨+ º ” s. Qt &[• °“ ~Zܖ € ½½ à e. t r Ó É  Õa 15: eigenvalueü eigenvector\ ½ô. ªË > < ¦Ç  ¨ 1.7 mathematica ÃÂ#ž  · ZZaæ ´ŸÉ H + : z'½ M shift+enter\ ô. ¦Ç   → ³r − >\ æ€ 1ܖ ë[# ”. ð H ¦x  ¼ l¼Ð ßþQ  –t  ...
View Full Document

This note was uploaded on 05/24/2011 for the course MATH 1010 taught by Professor Math during the Spring '11 term at Korea University.

Ask a homework question - tutors are online