Data je jednacina

4x - 5lnx = 5

(a) lokalizovati njena rjesenja (graficki)

(b) Metodom iteracije s tacnoscu 1/2 * 10^{-4} izracunati jedno rjesenje date jednacine

Rjesenja cemo lokalizovati graficki . Zapisimo jednacinu u slijedecem oblikuln x = (4/5) x - 1

RowBox[{Plot, [, RowBox[{{Log[x], (4/5) * x - 1}, ,, RowBox[{{, RowBox[{x, ,, 0.2, ,, 2.5}], }}]}], ]}]

[Graphics:HTMLFiles/Vjezbe-2_7.gif]

⁃Graphics⁃

RowBox[{RowBox[{RowBox[{Ocito,  , se,  , vidi,  , da,  , je,  , jedno,  , rjesenje,  , RowBox[ ... , nadjimo,  , joj,  , maksimum,  , na,  , RowBox[{intervalu,  , [, RowBox[{2, ,, 2.5}], ]}]}]}]}]

φ[x_] := (5/4) * (1 + Log[x]) ; RowBox[{maksimum, =, RowBox[{Maximize, [, RowBox[{φ '[x], ,, RowBox[{{, RowBox[{x>2, ,, RowBox[{x, <, 2.5}]}], }}], ,, {x}}], ]}]}]

RowBox[{{, RowBox[{0.625, ,, RowBox[{{, RowBox[{x, , 2.}], }}]}], }}]

RowBox[{RowBox[{RowBox[{Primjetite,  , da,  , ova,  , funkcija,  , radi,  , samo,  , u,  , Mat ... od 1, iterativna metoda x_ (n + 1) = (5/4) (1 + ln x_n) konvergira . Rijesimo je pomocu Do petlje

RowBox[{RowBox[{x, =, 2.25}], ;}] Do[x = (5/4) * (1 + Log[x]), {100} ] ; x

2.28049

Clear[x] ; Solve[Log[x]  (4/5) * x - 1, x]

InverseFunction :: ifun : Inverse functions are being used. Values may be lost for multivalued inverses.  More…

InverseFunction :: ifun : Inverse functions are being used. Values may be lost for multivalued inverses.  More…

InverseFunction :: ifun : Inverse functions are being used. Values may be lost for multivalued inverses.  More…

General :: stop : Further output of InverseFunction :: ifun will be suppressed during this calculation. More…

Solve :: ifun : Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.  More…

{{x -5/4 ProductLog[-4/(5 )]}, {x -5/4 ProductLog[-1, -4/(5 )]}}

Primjetite da Mathematica ima problema sa ovom jednacinom . No mozemo koristiti NSolve ...

NSolve[Log[x]  (4/5) * x - 1, x]

InverseFunction :: ifun : Inverse functions are being used. Values may be lost for multivalued inverses.  More…

InverseFunction :: ifun : Inverse functions are being used. Values may be lost for multivalued inverses.  More…

InverseFunction :: ifun : Inverse functions are being used. Values may be lost for multivalued inverses.  More…

General :: stop : Further output of InverseFunction :: ifun will be suppressed during this calculation. More…

Solve :: ifun : Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.  More…

RowBox[{{, RowBox[{RowBox[{{, RowBox[{x, , 0.58959}], }}], ,, RowBox[{{, RowBox[{x, , 2.28049}], }}]}], }}]

Rijesiti sistem linearnih algebarskih jednacina pomocu matrica i koristenjem funkcije  "Solve"

RowBox[{RowBox[{RowBox[{3.35, x1}], +, RowBox[{0.45, x2}], +, RowBox[{0.56, x3}], +, RowBox[{0 ... Box[{0.75, x1}], +, RowBox[{0.34, x2}], +, RowBox[{0.38, x3}], +, RowBox[{3.37, x4}]}], =, 0.49}]

A = (3.35   0.45   0.56   0.57)       0.60   3.56   0.53   0.43       0.65   0.49   3.92   0.76       0.75   0.34   0.38   3.37

RowBox[{{, RowBox[{RowBox[{{, RowBox[{3.35, ,, 0.45, ,, 0.56, ,, 0.57}], }}], ,, RowBox[{{, Ro ... 0.49, ,, 3.92, ,, 0.76}], }}], ,, RowBox[{{, RowBox[{0.75, ,, 0.34, ,, 0.38, ,, 3.37}], }}]}], }}]

B = Inverse[A]

RowBox[{{, RowBox[{RowBox[{{, RowBox[{0.320766, ,, RowBox[{-, 0.03139}], ,, RowBox[{-, 0.03752 ... ox[{-, 0.0632043}], ,, RowBox[{-, 0.019426}], ,, RowBox[{-, 0.0187971}], ,, 0.314144}], }}]}], }}]

a = (1.32)       2.41       1.26       0.49

RowBox[{{, RowBox[{RowBox[{{, 1.32, }}], ,, RowBox[{{, 2.41, }}], ,, RowBox[{{, 1.26, }}], ,, RowBox[{{, 0.49, }}]}], }}]

x = {{x1}, {x2}, {x3}, {x4}}

{{x1}, {x2}, {x3}, {x4}}

rjesenje = B . a

RowBox[{{, RowBox[{RowBox[{{, 0.28, }}], ,, RowBox[{{, 0.6, }}], ,, RowBox[{{, 0.2, }}], ,, RowBox[{{, RowBox[{-, 1.80249*10^-18}], }}]}], }}]

A . x

RowBox[{{, RowBox[{RowBox[{{, RowBox[{RowBox[{3.35,  , x1}], +, RowBox[{0.45,  , x2}], +, RowB ... , x1}], +, RowBox[{0.34,  , x2}], +, RowBox[{0.38,  , x3}], +, RowBox[{3.37,  , x4}]}], }}]}], }}]

RowBox[{Solve, [, RowBox[{RowBox[{{, RowBox[{RowBox[{RowBox[{RowBox[{3.35, x1}], +, RowBox[{0. ... , +, RowBox[{0.38, x3}], +, RowBox[{3.37,  , x4}]}], ==, 0.49}]}], }}], ,, {x1, x2, x3, x4}}], ]}]

RowBox[{{, RowBox[{{, RowBox[{RowBox[{x1, , 0.28}], ,, RowBox[{x2, , 0.6}], ,, RowBox[{x3, , 0.2}], ,, RowBox[{x4, , RowBox[{-, 3.35912*10^-18}]}]}], }}], }}]


Created by Mathematica  (November 7, 2007)