Mathematica
Cvičenie 2
 
RIEŠENIE ROVNICE
Solve[rovnica,neznáma]          - presný výsledok 
Solve[rovnica,neznáma]//N     - nunericky vyjadrený výsledok
 ÚLOHA č.1:
Nájdite priesečníky grafu funkcie f(x) s osou x a zobrazte graf funkcie f(x), ak
a)  f(x) =  - 4x - 4
 - 4x - 4
b)  f(x) =  - 4x + 4
 - 4x + 4
c)  f(x) =  - 4x + 14
 - 4x + 14
Riešenie a)
In[1]:=
 ![Clear[x, y]](HTMLFiles/index_4.gif) 
In[2]:=
 ![Solve[x^2 - 4x - 40, x]](HTMLFiles/index_5.gif) 
Out[2]=
  
In[3]:=
 ![Solve[x^2 - 4x - 40, x]//N](HTMLFiles/index_7.gif) 
Out[3]=
  
In[4]:=
 ![Plot[x^2 - 4 * x - 4, {x, -5, 15}]](HTMLFiles/index_9.gif) 
 ![[Graphics:HTMLFiles/index_10.gif]](HTMLFiles/index_10.gif) 
Out[4]=
  
Riešenie b)
In[5]:=
 ![Solve[x^2 - 4x + 40, x]](HTMLFiles/index_12.gif) 
Out[5]=
  
In[6]:=
 ![Plot[x^2 - 4 * x + 4, {x, -1, 4}]](HTMLFiles/index_14.gif) 
 ![[Graphics:HTMLFiles/index_15.gif]](HTMLFiles/index_15.gif) 
Out[6]=
  
 
Riešenie c)
In[7]:=
 ![Solve[x^2 - 4x + 140, x]](HTMLFiles/index_17.gif) 
Out[7]=
  
In[8]:=
 ![Plot[x^2 - 4 * x + 14, {x, -5, 15}]](HTMLFiles/index_19.gif) 
 ![[Graphics:HTMLFiles/index_20.gif]](HTMLFiles/index_20.gif) 
Out[8]=
  
 
RIEŠENIE SYSTÉMU ROVNÍC
Solve[ {rovnica1,rovnica2, ..., rovnica k}, {neznáma1,neznáma2, ...,neznáma k} ]    - presný výsledok 
                                                                                                                                       
Solve[ {rovnica1,rovnica2, ..., rovnica k},{neznáma1,neznáma2, ...,neznáma k} ] //N   - numerický výsledok 
                                                                                  
  
  Riešenie a) 
Systém má jediné riešenie
In[9]:=
 ![Solve[{x + y + z3, x - 2y + 3z1, 2x - y - z0}, {x, y, z}]](HTMLFiles/index_23.gif) 
Out[9]=
  
In[10]:=
 ![Solve[{x + y + z3, x - 2y + 3z1, 2x - y - z0}, {x, y, z}]//N](HTMLFiles/index_25.gif) 
Out[10]=
  
 Riešenie b) 
Systém má nekonečne veľa riešení
In[11]:=
 ![Solve[{x + y + z3, x - 2y + 3z1, 2x - y + 4z4}, {x, y, z}]](HTMLFiles/index_27.gif) 
  
Out[11]=
  
 Riešenie c)
Systém nemá riešenie
In[12]:=
 ![Solve[{x + y + z3, x - 2y + 3z1, 2x - y + 4z5}, {x, y, z}]](HTMLFiles/index_30.gif) 
Out[12]=
  
Kreslenie grafu funkcií a parametre kreslenia
 ÚLOHA č. 3:
a)   Definujte funkciu f(x) = 4  .
.
b)   Vypočítajte f(3).
c)   Zobrazte graf f(x) na intervale x∈<-5,5>.
d)   Zobrazte graf f(x) na intervale x∈<-5,5> a na celom H(f).
e)   Zobrazte graf f(x) na intervale x∈<-5,5> a pre y∈<0,0.1>.
f)    Na grafe f(x) označte súradnicové osi.
g)   Zobrazte graf f(x) hrubšou čiarou.
h)   Zobrazte graf f(x) čiarkovanou čiarou.
i)    Zobrazte graf f(x) červenou čiarou.
j)   Definujte funkciu g(x) = a zobrazte jej graf pre x∈<-5,5> zelenou hrubšou čiarou.
a zobrazte jej graf pre x∈<-5,5> zelenou hrubšou čiarou.
k)   Zobrazte grafy f(x) a g(x) do jedného obrázka a aj v mierke x : y=1 : 1.
  Riešenie a)
Definujte funkciu f(x) = 4  .
.
In[13]:=
 ![Clear[f, x]](HTMLFiles/index_35.gif) 
 ![f[x_] = 4E^(-x^2)](HTMLFiles/index_36.gif) 
Out[14]=
  
  Riešenie b)
Vypočítajte f(3).
In[15]:=
 ![f[3]](HTMLFiles/index_38.gif) 
Out[15]=
  
In[16]:=
  
Out[16]=
  
  Riešenie c)
Zobrazte graf f(x) na intervale x∈<-5,5>.
In[17]:=
 ![gf = Plot[f[x], {x, -5, 5}]](HTMLFiles/index_42.gif) 
 ![[Graphics:HTMLFiles/index_43.gif]](HTMLFiles/index_43.gif) 
Out[17]=
  
  Riešenie d)
Zobrazte graf f(x) na intervale x∈<-5,5> a na celom H(f).
In[18]:=
 ![Plot[f[x], {x, -5, 5}, PlotRange->All]](HTMLFiles/index_45.gif) 
 ![[Graphics:HTMLFiles/index_46.gif]](HTMLFiles/index_46.gif) 
Out[18]=
  
  Riešenie e)
 Zobrazte graf f(x) na intervale x∈<-5,5> a pre y∈<0,0.1>.
In[19]:=
 ![Plot[f[x], {x, -5, 5}, PlotRange {0, 0.1}]](HTMLFiles/index_48.gif) 
 ![[Graphics:HTMLFiles/index_49.gif]](HTMLFiles/index_49.gif) 
Out[19]=
  
  Riešenie f)
Na grafe f(x) označte súradnicové osi.
In[20]:=
 ![gf = Plot[f[x], {x, -5, 5}, PlotRange->All, AxesLabel {"x", "y"}]](HTMLFiles/index_51.gif) 
 ![[Graphics:HTMLFiles/index_52.gif]](HTMLFiles/index_52.gif) 
Out[20]=
  
  Riešenie g)
Zobrazte graf f(x) hrubšou čiarou.
In[21]:=
 ![Plot[f[x], {x, -5, 5}, PlotRangeAll, AxesLabel {"x", "y"}, PlotStyleThickness[0.02]]](HTMLFiles/index_54.gif) 
 ![[Graphics:HTMLFiles/index_55.gif]](HTMLFiles/index_55.gif) 
Out[21]=
  
  Riešenie h)
Zobrazte graf f(x) čiarkovanou čiarou.
In[22]:=
 ![Plot[f[x], {x, -5, 5}, PlotRangeAll, AxesLabel {"x", "y"}, PlotStyleDashing[{0.04, 0.02}]]](HTMLFiles/index_57.gif) 
 ![[Graphics:HTMLFiles/index_58.gif]](HTMLFiles/index_58.gif) 
Out[22]=
  
In[23]:=
 ![Plot[f[x], {x, -5, 5}, PlotRangeAll, AxesLabel {"x", "y"}, PlotStyle {Dashing[{0.02, 0.01}], Thickness[0.01]}]](HTMLFiles/index_60.gif) 
 ![[Graphics:HTMLFiles/index_61.gif]](HTMLFiles/index_61.gif) 
Out[23]=
  
  Riešenie i)
Zobrazte graf f(x) červenou čiarou.
In[24]:=
 ![Plot[f[x], {x, -5, 5}, PlotRangeAll, AxesLabel {"x", "y"}, PlotStyle {Dashing[{0.02, 0.01}], Thickness[0.01], RGBColor[1, 0, 0]}]](HTMLFiles/index_63.gif) 
 ![[Graphics:HTMLFiles/index_64.gif]](HTMLFiles/index_64.gif) 
Out[24]=
  
  Riešenie j)
Definujte funkciu g(x) = a zobrazte jej graf pre x∈<-5,5> zelenou hrubšou čiarou.
a zobrazte jej graf pre x∈<-5,5> zelenou hrubšou čiarou.
In[25]:=
 ![Clear[g, x]](HTMLFiles/index_67.gif) 
 ![g[x_] = (25 - x^2)^(1/2)](HTMLFiles/index_68.gif) 
Out[26]=
  
In[27]:=
 ![gg = Plot[g[x], {x, -5, 5}, PlotStyle {RGBColor[0, 1, 0], Thickness[0.01]}]](HTMLFiles/index_70.gif) 
 ![[Graphics:HTMLFiles/index_71.gif]](HTMLFiles/index_71.gif) 
Out[27]=
  
  Riešenie k)
Zobrazte grafy f(x) a g(x) do jedného obrázka a aj v mierke x : y=1 : 1.
In[28]:=
 ![Show[gf, gg]](HTMLFiles/index_73.gif) 
 ![[Graphics:HTMLFiles/index_74.gif]](HTMLFiles/index_74.gif) 
Out[28]=
  
In[29]:=
 ![Show[gf, gg, AspectRatioAutomatic]](HTMLFiles/index_76.gif) 
 ![[Graphics:HTMLFiles/index_77.gif]](HTMLFiles/index_77.gif) 
Out[29]=
  
In[30]:=
 ![Show[gf, gg, AspectRatioAutomatic, PlotRange {0, 3}]](HTMLFiles/index_79.gif) 
 ![[Graphics:HTMLFiles/index_80.gif]](HTMLFiles/index_80.gif) 
Out[30]=
  
 LIMITA FUNKCIE y =
Limit [ expr., x-> ]
]
 ÚLOHA č. 4:
Definujte funkciu f(x) =  .
.
a)   Zobrazte graf f(x) na intervale x∈<-5,5>.
b)  Vypočítajte limitu  f(x) pre x = 6 a x = -7.
c)  Vypočítajte limitu  f(x) v nevlastných bodoch.
d)  Vypočítajte limitu a jednostranné limity f(x) v bode nespojitosti. Porovnajte výstupy príslušných príkazov a urobte záver.
 
Definovanie funkcie f(x) a jej graf
In[31]:=
 ![Clear[f, x]](HTMLFiles/index_85.gif) 
 ![f[x_] = 1/x](HTMLFiles/index_86.gif) 
Out[32]=
  
In[33]:=
 ![Plot[f[x], {x, -5, 5}]](HTMLFiles/index_88.gif) 
 ![[Graphics:HTMLFiles/index_89.gif]](HTMLFiles/index_89.gif) 
Out[33]=
  
 
Limita funkcie v ľubovolnom bode z D(f)
In[34]:=
 ![Limit[f[x], x6]](HTMLFiles/index_91.gif) 
Out[34]=
  
In[35]:=
  
Out[35]=
  
In[36]:=
 ![Limit[f[x], x -7]//N](HTMLFiles/index_95.gif) 
Out[36]=
  
 
Limita funkcie v nevlastnom bode 
In[37]:=
 ![Limit[f[x], xInfinity]](HTMLFiles/index_97.gif) 
Out[37]=
  
In[38]:=
 ![Limit[f[x], x -Infinity]](HTMLFiles/index_99.gif) 
Out[38]=
  
 
Jednostranné limity  funkcie v  bode nespojitosti
In[39]:=
 ![Limit[f[x], x0, Direction1]](HTMLFiles/index_101.gif) 
Out[39]=
  
In[40]:=
 ![Limit[f[x], x0, Direction -1]](HTMLFiles/index_103.gif) 
Out[40]=
  
 
Limita  funkcie v  bode nespojitosti
In[41]:=
 ![Limit[f[x], x0]](HTMLFiles/index_105.gif) 
Out[41]=
  
 DERIVÁCIA FUNKCIE y =
Príkazy: 
1. derivácia D[ f[x], x ], f'[x]
2. derivácia D[ f[x], x,x ], D[ f[x], {x,2} ], f''[x]
Derivácia rádu n: D[ f[x], {x,n} ]
 ÚLOHA č. 5:
Pre funkciu f(x) =  .
.
a)   Vypočítajte  f ' (x) .
b)   Vypočítajte  f '' (x) .
c)  Vypočítajte  f '' (-5) .
d)  Vypočítajte   (x) .
 (x) .
e)   Vypočítajte  deriváciu f(x) vyššieho rádu - napr. 13. rádu.
 
 1. derivácia funkcie 
In[42]:=
 ![f '[x]](HTMLFiles/index_110.gif) 
Out[42]=
  
 
 2. derivácia funkcie 
In[43]:=
 ![f''[x]](HTMLFiles/index_112.gif) 
Out[43]=
  
 
 2. derivácia funkcie v  bode x = -5
In[44]:=
 ![f''[-5]](HTMLFiles/index_114.gif) 
Out[44]=
  
In[45]:=
  
Out[45]=
  
 
 3. derivácia funkcie 
In[46]:=
 ![f'''[x]](HTMLFiles/index_118.gif) 
Out[46]=
  
In[47]:=
 ![D[f[x], {x, 3}]](HTMLFiles/index_120.gif) 
Out[47]=
  
 
 Derivácie funkcie vyššieho rádu (napr. 13. derivácia)
In[48]:=
 ![D[f[x], {x, 13}]](HTMLFiles/index_122.gif) 
Out[48]=
  
 ÚLOHY NA PRECVIČENIE
1.  
Nájdite riešenie rovníc 
a)      (4x - 2) +
(4x - 2) +  (2 - 3x) = -2
(2 - 3x) = -2
b)       -
 -  =
 = 
2. 
Riešte nasledovné systémy rovníc
a)   2x + y - 3z = 10 , 3x + 2y + 3z = 2 , x + 6y - 5z = 6.
b)   2x + y - 3z = 10 , 3x + 2y + 3z = 2 , x + 6y - 5z = -8.
c)   2x + y - 3z = 10 , 3x + 2y + 3z = 2 , x + 6y - 5z = 8.
3.  
Je daná f: y = 1 - x  + ln(x)  a g: y = 2 .
.
a)     Zobrazte grafy f(x) a g(x) na definičnom obore g(x), v mierke x : y = 1 : 1, 
       pričom graf f(x) bude bude modrý, graf g(x) bude čiarkovaný a hrubšou čiarou. 
 b)   Vyznačte na grafe (v jednom obr.) súradnicové osi.:
 c)   Vypočítajte f(5).
 d)   Vypočítajte limitu f(x) v bode x = 0.
 d)   Vypočítajte g''(-1).
 e)   Vypočítajte g ' (x) v bode x = 2.
 Funkcia - odložené priradenie
f [ x_ ]:=
 Úloha č. 6
a) Rôznou farbou nakreslite grafy funkcií a zobrazte ich v spoločnom obrázku.
b) Definujte funkciu f(x), ak
Správnosť overte výpočtom pre x z oboch intervalov. 
c) Graf funkcie nakreslite na vhodnom intervale.
Graf funkcie f (x) nakreslite:
1) farebne,
2) hrubou čiarou, 
3)  čiarkovane, 
4)  v celom rozsahu
5) v celom rozsahu, čiarkovane a farebne súčasne
Riešenie a)
In[49]:=
 ![G1 = Plot[Cos[x], {x, -Pi, 0}, PlotStyle->RGBColor[0, 0, 0.627451]]](HTMLFiles/index_132.gif) 
 ![[Graphics:HTMLFiles/index_133.gif]](HTMLFiles/index_133.gif) 
Out[49]=
  
In[50]:=
 ![G2 = Plot[-x^2 + 1, {x, 0, Pi}, PlotStyle->RGBColor[1, 0, 0]]](HTMLFiles/index_135.gif) 
 ![[Graphics:HTMLFiles/index_136.gif]](HTMLFiles/index_136.gif) 
Out[50]=
  
In[51]:=
 ![Show[G1, G2]](HTMLFiles/index_138.gif) 
 ![[Graphics:HTMLFiles/index_139.gif]](HTMLFiles/index_139.gif) 
Out[51]=
  
Riešenie b)
Funkcia - odložené priradenie f [x_]:= ....
In[52]:=
 ![Clear[f]](HTMLFiles/index_141.gif) 
 ![f[x_] := Cos[x]/;x<0](HTMLFiles/index_142.gif) 
 ![f[x_] := -x^2 + 1/;x>=0](HTMLFiles/index_143.gif) 
In[55]:=
 ![f[-1]](HTMLFiles/index_144.gif) 
Out[55]=
 ![Cos[1]](HTMLFiles/index_145.gif) 
In[56]:=
 ![f[1]](HTMLFiles/index_146.gif) 
Out[56]=
  
In[57]:=
 ![f[0]](HTMLFiles/index_148.gif) 
Out[57]=
  
In[58]:=
 ![G1 = Plot[f[x], {x, -Pi, Pi}]](HTMLFiles/index_150.gif) 
 ![[Graphics:HTMLFiles/index_151.gif]](HTMLFiles/index_151.gif) 
Out[58]=
  
 Úloha č. 7
Zostavte tabuľku funkcie f(x) z príkladu č. 6 pre  x ∈ -3, 3> s krokom tabuľky 0.5. Tabuľku zobrazte s vhodným záhlavím.
Príkazy: Table[expr, {i,  ,
,  , di}], TableForm[list, options]
, di}], TableForm[list, options] 
In[59]:=
 ![T = Table[{x, f[x]}, {x, -3, 3, 0.5}]](HTMLFiles/index_155.gif) 
Out[59]=
 ![{{-3, Cos[3]}, {-2.5, -0.801144}, {-2., -0.416147}, {-1.5, 0.0707372}, {-1., 0.540302}, {-0.5, 0.877583}, {0., 1.}, {0.5, 0.75}, {1., 0.}, {1.5, -1.25}, {2., -3.}, {2.5, -5.25}, {3., -8.}}](HTMLFiles/index_156.gif) 
In[60]:=
 ![TableForm[T, TableHeadings {None, {"x", "f (x)"}}]](HTMLFiles/index_157.gif) 
Out[60]//TableForm=
| x | f (x) | 
| -3 | Cos[3] | 
| -2.5` | -0.8011436155469337` | 
| -2.` | -0.4161468365471424` | 
| -1.5` | 0.0707372016677029` | 
| -1.` | 0.5403023058681398` | 
| -0.5` | 0.8775825618903728` | 
| 0.` | 1.` | 
| 0.5` | 0.75` | 
| 1.` | 0.` | 
| 1.5` | -1.25` | 
| 2.` | -3.` | 
| 2.5` | -5.25` | 
| 3.` | -8.` | 
 Nakreslite (farebne) graf  funkcie danej tabuľkou. 
Príkaz:  ListPlot[list, options] , Parametre kreslenia - options: PointSize[..], RGBColor[..] alebo Hue[..]
In[61]:=
 ![G2 = ListPlot[T, PlotStyle->PointSize[0.03]]](HTMLFiles/index_158.gif) 
 ![[Graphics:HTMLFiles/index_159.gif]](HTMLFiles/index_159.gif) 
Out[61]=
  
In[62]:=
 ![G3 = ListPlot[T, PlotStyle {PointSize[0.03], RGBColor[1, 0, 0]}]](HTMLFiles/index_161.gif) 
 ![[Graphics:HTMLFiles/index_162.gif]](HTMLFiles/index_162.gif) 
Out[62]=
  
Spojte graf funkcie f (x) danej spojitou funkciou a graf funkcie f (x) danej tabuľkou do jedného obrázku.
In[63]:=
 ![Show[G1, G2]](HTMLFiles/index_164.gif) 
 ![[Graphics:HTMLFiles/index_165.gif]](HTMLFiles/index_165.gif) 
Out[63]=
  
 Úloha č. 8
Motorové vozidlo ide po suchej asfaltovej ceste rýchlosťou v = 60 km/h.Vodič zbadá prekážku. Reakčná doba je jedna sekunda, potom nasleduje brzdenie.
Vytvorte funkciu na výpočet dráhy s[m], ktorú vozidlo prejde za čas t[s] od okamihu zbadania prekážky. Nakreslite graf funkcie na intervale t ∈ <0,10> sekúnd. Vytvorte tabuľku závislosti prejdenej dráhy od času t pre t ∈ <0,10> sekúnd. nakreslite graf funkcie danej tabuľkou. Obidva grafy zobrazte v jednom obrázku.
Návod: Dráhu s[m] počítame ako hodnotu funkcie: s=v t  pre t z intervalu < 0 s, 1 s > (reakčná doba) a s=v t - μ g
 μ g  ,    pre t > 1 s  (brzdenie),
 ,    pre t > 1 s  (brzdenie),
kde   μ = 0,8   je súčiniteľ priľnavosti pre suchý asfalt, g = 9,81 ms-2  je gravitačné zrýchlenie, v [ ms-1]  je počiatočná rýchlosť vozidla. 
Riešenie :
Prípravné grafy a výpočty:
In[64]:=
  
In[65]:=
 ![Plot[v t - 1/2μ g (t - 1)^2, {t, 0, 10}]](HTMLFiles/index_170.gif) 
 ![[Graphics:HTMLFiles/index_171.gif]](HTMLFiles/index_171.gif) 
Out[65]=
  
In[66]:=
 ![R = Solve[D[v t - 1/2μ g (t - 1)^2, t] 0, t]](HTMLFiles/index_173.gif) 
Out[66]=
  
In[67]:=
 ![HH = R[[1, 1, 2]]](HTMLFiles/index_175.gif) 
Out[67]=
  
Definovanie funkcie a kontrolné výpočty:
In[68]:=
 ![Clear[s, t]](HTMLFiles/index_177.gif) 
 ![s[t_] := v t /;0<=t<=1](HTMLFiles/index_178.gif) 
 ![s[t_] := v t - 1/2μ g (t - 1)^2/;1<t≤HH](HTMLFiles/index_179.gif) 
 ![s[t_] := s[HH] /;t>HH](HTMLFiles/index_180.gif) 
In[72]:=
 ![s[0.1]](HTMLFiles/index_181.gif) 
Out[72]=
  
In[73]:=
 ![s[10]](HTMLFiles/index_183.gif) 
Out[73]=
  
Graf:
In[74]:=
 ![G8a = Plot[s[t], {t, 0, 1}, PlotStyle->RGBColor[1, 0, 0], PlotRangeAll]](HTMLFiles/index_185.gif) 
 ![[Graphics:HTMLFiles/index_186.gif]](HTMLFiles/index_186.gif) 
Out[74]=
  
In[75]:=
 ![G8b = Plot[s[t], {t, 1, HH}, PlotStyle->RGBColor[0, 1, 0], PlotRangeAll]](HTMLFiles/index_188.gif) 
 ![[Graphics:HTMLFiles/index_189.gif]](HTMLFiles/index_189.gif) 
Out[75]=
  
In[76]:=
 ![G8c = Plot[s[t], {t, HH, 10}, PlotStyle->RGBColor[0, 0, 1], PlotRangeAll]](HTMLFiles/index_191.gif) 
 ![[Graphics:HTMLFiles/index_192.gif]](HTMLFiles/index_192.gif) 
Out[76]=
  
In[77]:=
 ![G8 = Show[G8a, G8b, G8c]](HTMLFiles/index_194.gif) 
 ![[Graphics:HTMLFiles/index_195.gif]](HTMLFiles/index_195.gif) 
Out[77]=
  
In[78]:=
 ![G8 = Plot[s[t], {t, 0, 10}, PlotStyle->RGBColor[1, 0, 0], PlotRangeAll]](HTMLFiles/index_197.gif) 
 ![[Graphics:HTMLFiles/index_198.gif]](HTMLFiles/index_198.gif) 
Out[78]=
  
Tabuľka:
In[79]:=
 ![T = Table[{t, s[t]//N}, {t, 0, 10, 0.52}]](HTMLFiles/index_200.gif) 
Out[79]=
  
In[80]:=
 ![TableForm[T, TableHeadings {None, {"čas[t]", "dráha[m]"}}]](HTMLFiles/index_202.gif) 
Out[80]//TableForm=
| čas[t] | dráha[m] | 
| 0 | 0.` | 
| 0.52` | 8.666666666666668` | 
| 1.04` | 17.327054933333336` | 
| 1.56` | 24.769433600000003` | 
| 2.08` | 30.08971306666667` | 
| 2.6` | 33.28789333333333` | 
| 3.12` | 34.363974400000004` | 
| 3.64` | 34.36402763619889` | 
| 4.16` | 34.36402763619889` | 
| 4.68` | 34.36402763619889` | 
| 5.2` | 34.36402763619889` | 
| 5.720000000000001` | 34.36402763619889` | 
| 6.24` | 34.36402763619889` | 
| 6.76` | 34.36402763619889` | 
| 7.28` | 34.36402763619889` | 
| 7.800000000000001` | 34.36402763619889` | 
| 8.32` | 34.36402763619889` | 
| 8.84` | 34.36402763619889` | 
| 9.36` | 34.36402763619889` | 
| 9.88` | 34.36402763619889` | 
Graf funkcie danej tabuľkou:
In[81]:=
 ![G8T = ListPlot[T, PlotStyle->PointSize[0.03]]](HTMLFiles/index_203.gif) 
 ![[Graphics:HTMLFiles/index_204.gif]](HTMLFiles/index_204.gif) 
Out[81]=
  
In[82]:=
 ![Show[G8, G8T]](HTMLFiles/index_206.gif) 
 ![[Graphics:HTMLFiles/index_207.gif]](HTMLFiles/index_207.gif) 
Out[82]=
  
Na riešenie úlohy 8 zostavte program:
In[83]:=
 ![Clear[s, t, μ, g, v]](HTMLFiles/index_209.gif) 
  
 ![R = Solve[D[v t - 1/2μ g (t - 1)^2, t] 0, t] ;](HTMLFiles/index_211.gif) 
 ![HH = R[[1, 1, 2]] ;](HTMLFiles/index_212.gif) 
 ![s[t_] := v t /;0<=t<=1](HTMLFiles/index_213.gif) 
 ![s[t_] := v t - 1/2μ g (t - 1)^2/;1<t≤HH](HTMLFiles/index_214.gif) 
 ![s[t_] := s[3.12] /;t>HH](HTMLFiles/index_215.gif) 
 ![Print["Graf spojitej funkcie f(x)"]](HTMLFiles/index_216.gif) 
 ![G8 = Plot[s[t], {t, 0, 10}, PlotStyle->RGBColor[1, 0, 0], PlotRangeAll] ;](HTMLFiles/index_217.gif) 
 ![Print["Tabuľka funkcie f(x)"]](HTMLFiles/index_218.gif) 
 ![T = Table[{t, s[t]//N}, {t, 0, 10, 0.52}]](HTMLFiles/index_219.gif) 
 ![TableForm[T, TableHeadings {None, {"čas[t]", "dráha[m]"}}]](HTMLFiles/index_220.gif) 
 ![Print["Graf  funkcie f(x) danej tabuľkou"]](HTMLFiles/index_221.gif) 
 ![G8T = ListPlot[T, PlotStyle->PointSize[0.03]] ;](HTMLFiles/index_222.gif) 
 ![Print["Graf oboch funkcií"]](HTMLFiles/index_223.gif) 
 ![Show[G8, G8T]](HTMLFiles/index_224.gif) 
  
 ![[Graphics:HTMLFiles/index_226.gif]](HTMLFiles/index_226.gif) 
  
Out[93]=
  
Out[94]//TableForm=
| čas[t] | dráha[m] | 
| 0 | 0.` | 
| 0.52` | 8.666666666666668` | 
| 1.04` | 17.327054933333336` | 
| 1.56` | 24.769433600000003` | 
| 2.08` | 30.08971306666667` | 
| 2.6` | 33.28789333333333` | 
| 3.12` | 34.363974400000004` | 
| 3.64` | 34.363974400000004` | 
| 4.16` | 34.363974400000004` | 
| 4.68` | 34.363974400000004` | 
| 5.2` | 34.363974400000004` | 
| 5.720000000000001` | 34.363974400000004` | 
| 6.24` | 34.363974400000004` | 
| 6.76` | 34.363974400000004` | 
| 7.28` | 34.363974400000004` | 
| 7.800000000000001` | 34.363974400000004` | 
| 8.32` | 34.363974400000004` | 
| 8.84` | 34.363974400000004` | 
| 9.36` | 34.363974400000004` | 
| 9.88` | 34.363974400000004` | 
  
 ![[Graphics:HTMLFiles/index_230.gif]](HTMLFiles/index_230.gif) 
  
 ![[Graphics:HTMLFiles/index_232.gif]](HTMLFiles/index_232.gif) 
Out[98]=
  
 ÚLOHY NA PRECVIČENIE 2
Ku nasledujúcim úlohám 
a) vytvorte funkciu na výpočet, 
b) nakreslite graf funkcie na vhodnom intervale s použitím niektorého parametra kreslenia, 
c) vytvorte tabuľku závislosti hodnoty funkcie od nezávisle premennej s vhodným krokom,
d) nakreslite graf funkcie danej tabuľkou,
e) obidva grafy zobrazte v jednom obrázku,
f) po odladení príkazy spojte do jedného programu (v jednej bunke) .
 1. Výpočet obsahu kruhu [ ] pre r ∈<0,100> cm.
] pre r ∈<0,100> cm.
2. Výpočet dráhy pohybu s [km] v závislosti od rýchlosti v [km/h] pri danom čase t [min]. Vytvorte variant pre zadávanie času t z klávesnice (Príkaz t = Input["Zadaj čas v minútach"].
3. Výpočet času [s] pri voľnom páde ( h =  g
g  ) pri danej výške h. Vytvorte variant pre zadávanie výšky h z klávesnice.
) pri danej výške h. Vytvorte variant pre zadávanie výšky h z klávesnice.
4. Výpočet spotreby paliva Sp [kg/h] od výkonu motora P [kW] pre  lodné motory so vstrekovaním Common Rail, keď  =
= [kg/h] ,
 [kg/h] ,  =170 g/kWh.
=170 g/kWh. 
5. Výpočet podbrúsenia h v závislosti od priemeru závitníka d, ak h =(π .d.tgα )/n, kde   π = 3,1415926, d  je priemer závitníka v mm,  n=3  je počet drážok, α =3° je uhol chrbta. Vytvorte variant pre zadávanie počtu drážok a uhla chrbta z klávesnice. 
6. Výpočet minimálneho priemeru hriadeľa d od vzdialenosti medzi ložiskami l, ak d= ,
,  =
= ,
,  =m.g.l/4,
=m.g.l/4,  =
= , a  m = 300 kg , n = 50 s-1, P = 5,5 kW = 5,5.103 W , σdov =  107 MPa = 1,07.108 Pa ,  g = 9,81
, a  m = 300 kg , n = 50 s-1, P = 5,5 kW = 5,5.103 W , σdov =  107 MPa = 1,07.108 Pa ,  g = 9,81 (dosadzujte v základných jednotkách ).Vytvorte variant pre zadávanie premenných n, P a m z klávesnice.
 (dosadzujte v základných jednotkách ).Vytvorte variant pre zadávanie premenných n, P a m z klávesnice. 
| Created by Mathematica (November 19, 2008) |  |