anal szelsoertek_demo.nb parciális deriválás f x^ y^; f Sin x Cos y ; g D f, x ; h D f, y ; Show GraphicsArray PlotD f, x,,, y,,, AxesLabel StringForm "f ``", f, None, None, DisplayFunction Identity, PlotD g, x,,, y,,, AxesLabel StringForm " f x ``", g, None, None, DisplayFunction Identity, PlotD h, x,,, y,,, AxesLabel StringForm " f y ``", h, None, None, DisplayFunction Identity, DisplayFunction $DisplayFunction.5 -.5 - - - f Cos y Sin x - -.5 -.5 - - - - f x Cos x Cos y f - y GraphicsArray In[]:= Érintősík ClearAll f ; ClearAll x ; ClearAll y ; ClearAll x ; ClearAll y ; ClearAll Dx ; ClearAll Dy ; ClearAll D ; ClearAll nv ; ClearAll dx ; Out[6]= f x_, y_ x^ x y y^ 6 x y ; x ; y ; Dx D f x, y, x. x x, y y Dy D f x, y, y. x x, y y nv Dx, Dy, Out[7]= Out[8]= 8, 6,
anal szelsoertek_demo.nb In[9]:= ErintoSik x_, y_ z f x, y Dx x x Dy y y ; az x,y pontbeli érintősík egyenlete dx 5; PlotD f x, y, x, x dx, x dx, y, y dx, y dx - - 6 - - - Out[]= In[]:= SurfaceGraphics PlotD ErintoSik x, y,, x, x dx, x dx, y, y dx, y dx, Mesh False Adott x és y mellett ezt rakjuk majd a PlotD be, és akkor ábrázolja az érintősíkot. 5-5 - - Out[]= SurfaceGraphics
anal szelsoertek_demo.nb Parc. deriv, érintősík felület implicit képlettel G 6 x 9y 6 z ; x ; y ; f x_, y_ z. Solve G, z Dx x f x, y Dy y f x, y Dx x f x, y. x x, y y ; Dy y f x, y. x x, y y ; nv Dx, Dy, normálvektor ErintoSik x_, y_ f x, y Dx x x Dy y y érintősík egyenlete dx ; rajzolási tartományhoz dd ; normálvektor hossza Show PlotD f x, y, x, x dx, x dx, y, y dx, y dx, DisplayFunction Identity, PlotPoints 5, PlotD ErintoSik x, y, x, x dx, x dx, y, y dx, y dx, DisplayFunction Identity, Mesh False, GraphicsD Thickness., Hue, Line x, y, f x, y, x dd nv, y dd nv, f x, y dd nv, DisplayFunction $DisplayFunction 6 6 x 9y 8x 6 x 9y y 6 x 9y,, x y GraphicsD::nlist :.959,.,..65975 is not a list of three numbers. GraphicsD::nlist :.959,.598,..787 is not a list of three numbers. GraphicsD::nlist :.67,.598,..6967 is not a list of three numbers. General::stop : Further output of GraphicsD::nlist will be suppressed during this calculation.
anal szelsoertek_demo.nb 7.5 5.5 -.5 5-5 -5 5 - GraphicsD
anal szelsoertek_demo.nb 5 Iránymenti derivált ClearAll f ; ClearAll x ; ClearAll y ; ClearAll x ; ClearAll y ; ClearAll Dx ; ClearAll Dy ; ClearAll D ; ClearAll dx ; f x_, y_ x y ; x ; y ; Dx x f x, y Dy y f x, y D Dx Cos Dy Sin dx ; FuggolegesSik GraphicsD Polygon #, #. x #, #, #, #. x #, #, #, #. x #, #, #, #. x #, # &; ez rajzol egy téglalapot egy megadott egyenes fölé. Használat: FuggolegesSik x,x, x 6, z,z Plot D. x x, y y,,, p PlotD f x, y, x, x dx, x dx, y, y dx, y dx, PlotPoints 6 b PlotD, x, x dx, x dx, y, y dx, y dx, PlotPoints 6, Boxed False, Axes False Show p, b, GraphicsD PointSize., Hue, Point x, y, f x, y ; ps FuggolegesSik x dx, x dx, y. Solve y y Dy Dx. x x, y y x x, y,, 5 ; Dx,Dy irányvektorú egyenes fölé rajzolt sík. Mint tudjuk, a gradiens irányában a legnagyobb az iránymenti derivált. Show p, ps, b, GraphicsD PointSize., Hue, Point x, y, f x, y ; ps FuggolegesSik x dx, x dx, y. Solve y y Dx Dy. x x, y y x x, y,, ;, Dx Dy irányvektorú egyenes fölé rajzolt sík. Lásd: implicit függvény tétel. Show p, ps, b, GraphicsD PointSize., Hue, Point x, y, f x, y ; Házi feladat: Legyen f x,y x^ x y y^ 6 x y, a ZH ban szereplő függvény. Írd fel az x,y, pontban a legnagyobb iránymenti deriváltat Rajzoltasd ki az ebbe az irányba álló,,,f, pontra illeszkedő függőleges síkot a függvény által meghatározott felülettel együtt egy közös ábrában. x y x y x y Cos x y Sin
anal szelsoertek_demo.nb 6-5 6 - - Graphics - - SurfaceGraphics SurfaceGraphics
- - -.5.5 5 - - - -.5.5 5 - - - -.5.5 5 - anal szelsoertek_demo.nb 7
anal szelsoertek_demo.nb 8 Feltételes és lokális szélsőérték f x_, y_ Cos x Cos y ; függvény g x_ x ; feltétel pr.5; plotrange loksze Solve x f x, y, y f x, y, x, y ; stacionárius pontok loksze Transpose x. loksze, y. loksze, f x. loksze, y. loksze és hozzá a z koordináták ClearAll FuggolegesSik ; FuggolegesSik GraphicsD Polygon #, #. x #, #, #, #. x #, #, #, #. x #, #, #, #. x #, # &; p PlotD f x, y, x, pr, pr, y, g pr, g pr, PlotPoints 5 p PlotD f x, y, x, pr, pr, y, g pr, g pr, DisplayFunction Identity, PlotPoints 5 ; p FuggolegesSik pr, pr, g x,, ; p GraphicsD PointSize., Hue, Point loksze ; Show p, p, p, DisplayFunction $DisplayFunction, PlotRange Automatic, Automatic, Automatic p ContourPlot f x, y, x, pr, pr, y, g pr, g pr, ContourShading True, Contours, DisplayFunction Identity ; p Plot g x, x, pr, pr, PlotStyle Hue, DisplayFunction Identity Show p, p, DisplayFunction $DisplayFunction ; Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found.,,,,,,,,,,,,,,,,,,,,.5.5 - - - SurfaceGraphics
anal szelsoertek_demo.nb 9.5.5 - - - GraphicsD Graphics - - - - - - -
anal szelsoertek_demo.nb ClearAll f ; ClearAll F ; ClearAll g ; ClearAll G ; ClearAll x ; ClearAll y ; ClearAll x ; ClearAll y ; ClearAll Dx ; ClearAll Dy ; ClearAll D ; ClearAll nv ; ClearAll dx ; ClearAll pr ; f x_, y_ x^ ^ x^ y x ^; p PlotD f x, y, x,,, y,, loksze Solve D f x, y, x, D f x, y, y, x, y ; loksze Transpose x. loksze, y. loksze, f x. loksze, y. loksze p GraphicsD PointSize., Hue, Point loksze ; Show p, p, DisplayFunction $DisplayFunction, AspectRatio Automatic, PlotRange Automatic, Automatic, Automatic ; Table Show p,p,viewpoint.,k,, k,,, ; -5 - -5 - - - - SurfaceGraphics,,,,, -5 - - -
anal szelsoertek_demo.nb ClearAll f ; ClearAll F ; ClearAll g ; ClearAll G ; ClearAll x ; ClearAll y ; ClearAll x ; ClearAll y ; ClearAll Dx ; ClearAll Dy ; ClearAll D ; ClearAll nv ; ClearAll dx ; ClearAll pr ; f x_, y_ x Exp y x^ Exp y ; loksze Solve D f x, y, x, D f x, y, y, x, y ; loksze loksze ; loksze x. loksze, y. loksze, f x. loksze, y. loksze ; p PlotD f x, y, x,,, y,,, DisplayFunction Identity ; p GraphicsD PointSize., Hue, Point loksze ; Show p, p, DisplayFunction $DisplayFunction, ViewPoint,,, PlotRange Automatic, Automatic, Automatic ; Solve::ifun : Inverse functions are being used by Solve, so some solutions may not be found. -5 - - - - -
anal szelsoertek_demo.nb ClearAll f ; ClearAll F ; ClearAll g ; ClearAll G ; ClearAll x ; ClearAll y ; ClearAll x ; ClearAll y ; ClearAll Dx ; ClearAll Dy ; ClearAll D ; ClearAll nv ; ClearAll dx ; ClearAll pr ; Graphics`ImplicitPlot` pr.5; F x_, y_ x^ y; Ennek a szélsőértékeit keressük G x_, y_ x y ; a G feltétel mellett, azaz az egységkörön. DF x_, y_ D F x, y, x, D F x, y, y DG x_, y_ D G x, y, x, D G x, y, y p PlotD F x, y, x, pr, pr, y, pr, pr, DisplayFunction Identity ; p PlotD G x, y, x, pr, pr, y, pr, pr, DisplayFunction Identity ; p PlotD, x, pr, pr, y, pr, pr, Mesh False, DisplayFunction Identity ; Show p, p, DisplayFunction $DisplayFunction Show p, p, DisplayFunction $DisplayFunction Show p, p, p, DisplayFunction $DisplayFunction g x_ y. Solve G x, y, y f t_ Cos t, Sin t ; Kihasználom, hogy az egységkör a feltétel, és paraméterezem. A lehetséges szélsőértékhelyek: feltloksze Solve D F x, y mg x, y, x, D F x, y mg x, y, y, D F x, y mg x, y, m, x, y, m x, x,y - - GraphicsD
anal szelsoertek_demo.nb - - - GraphicsD - - GraphicsD x m,x, y, m,x, y, m, x,y, m, x,y
anal szelsoertek_demo.nb Ábrázolom a kört és néhány F konstans görbét. p ImplicitPlot G x, y, x, pr, pr, y, pr, pr, AxesOrigin,, DisplayFunction Identity ; p ImplicitPlot F x, y.5, x, pr, pr, y, pr, pr, AxesOrigin,, DisplayFunction Identity ; p5 ImplicitPlot F x, y, x, pr, pr, y, pr, pr, AxesOrigin,, DisplayFunction Identity ; p6 ImplicitPlot F x, y.5, x, pr, pr, y, pr, pr, AxesOrigin,, DisplayFunction Identity ; p7 ImplicitPlot F x, y.5, x, pr, pr, y, pr, pr, AxesOrigin,, DisplayFunction Identity ; p8 ImplicitPlot F x, y, x, pr, pr, y, pr, pr, AxesOrigin,, DisplayFunction Identity ; Show p, p, p5, p6, p7, p8, DisplayFunction $DisplayFunction ; Ebből leolvasható, hogy F feltételes minimuma, míg a feltételes maximum nagyobb egynél, de kisebb másfélnél..5.5 -.5 - -.5.5.5 -.5 - -.5 A kör paraméterezését használva felírhatom Pi 6 onként F és G gradiensét. dfelt Table f t, DG f t, f t, t,, Pi, Pi 6 ; dfv Table f t, DF f t, f t, t,, Pi, Pi 6 ; Graphics`PlotField` pdfelt ListPlotVectorField dfelt, VectorHeads True ; pdfv ListPlotVectorField dfv, VectorHeads True ; A lehetséges szélsőértékhelyeken a gradiensek párhuzamosak. Ha f gradiense nem merőleges a kör érintőjére, akkor az egyik irányba kicsit elmozdulva nagyobb, a másik irányba kicsit elmozdulva kisebb értékeket vesz föl f, tehát nem lehet szélsőérték. Show p, pdfelt, pdfv, DisplayFunction $DisplayFunction, Axes None ; Látható az előbb kiszámolt négy szélsőértékhely. Az alsó és a felső lokális minimum, a két oldalsó maximum. General::spell : Possible spelling error: new symbol name "pdfelt" is similar to existing symbol "dfelt".
anal szelsoertek_demo.nb 5 General::spell : Possible spelling error: new symbol name "pdfv" is similar to existing symbol "dfv".