Tietokoneharjoitus 5

------------------------------------------

Teht. 1

------------------------------------------

Input := 

f=Integrate[(10-x u-y v^2)^2,{u,0,1},{v,0,1}]
Output =

 2                                   2
x    x (-30 + y)   1500 - 100 y + 3 y
-- + ----------- + -------------------
3         3                15
Input := 

jacobi={D[f,x],D[f,y]}
Output =

 2 x   -30 + y  x   -100 + 6 y
{--- + -------, - + ----------}
  3       3     3       15
Input := 

Solve[jacobi=={0,0},{x,y}]
Output =

       80       50
{{x -> --, y -> --}}
       7        7
Input := 

f /. %5
Output =

  2                                   2
 x    x (-30 + y)   1500 - 100 y + 3 y
{-- + ----------- + -------------------}
 3         3                15
Input := 

hesse={{D[f,x,x],D[f,x,y]},{D[f,y,x],D[f,y,y]}}
Output =

  2  1    1  2
{{-, -}, {-, -}}
  3  3    3  5
Input := 

Det[hesse]
Output =

7
--
45
Input := 

Plot3D[f,{x,5,15},{y,5,10}]
Output =

-SurfaceGraphics-

------------------------------------------

Teht. 2

------------------------------------------

Input := 

Integrate[1/z,{x,0,Log[4]},{y,0,Log[4]-x},{z,E^(x+y),4}]
Integrate::gener: Unable to check convergence.
Output =

      3
Log[4]
-------
   6

------------------------------------------

Teht. 3

------------------------------------------

Input := 

<<LinearAlgebra`CrossProduct`
Input := 

u={x y z,0,y^2}
Output =

            2
{x y z, 0, y }
Input := 

r={x,y,z}={t,t,t^2}
Output =

        2
{t, t, t }
Input := 

Integrate[Cross[u,D[r,t]],{t,0,2}]
Output =

   8     56   32
{-(-), -(--), --}
   3     3    5

------------------------------------------

Teht. 4

------------------------------------------

Input := 

Clear[x,y,z,u,v,w]
Input := 

ratkaisu=Solve[{x==u y^2,y==v z^2,z==w x^2},{x,y,z}]
Output =

{{x -> 0, y -> 0, z -> 0}, 
 
              1                    1
  {x -> --------------, y -> --------------, 
         1/7  2/7  4/7        4/7  1/7  2/7
        u    v    w          u    v    w
 
              1
   z -> --------------}, 
         2/7  4/7  1/7
        u    v    w
 
                 1/7                   4/7
             (-1)                  (-1)
  {x -> -(--------------), y -> --------------, 
           1/7  2/7  4/7         4/7  1/7  2/7
          u    v    w           u    v    w
 
               2/7
           (-1)
   z -> --------------}, 
         2/7  4/7  1/7
        u    v    w
 
               2/7                    1/7
           (-1)                   (-1)
  {x -> --------------, y -> -(--------------), 
         1/7  2/7  4/7          4/7  1/7  2/7
        u    v    w            u    v    w
 
               4/7
           (-1)
   z -> --------------}, 
         2/7  4/7  1/7
        u    v    w
 
                 3/7                     5/7
             (-1)                    (-1)
  {x -> -(--------------), y -> -(--------------), 
           1/7  2/7  4/7           4/7  1/7  2/7
          u    v    w             u    v    w
 
               6/7
           (-1)
   z -> --------------}, 
         2/7  4/7  1/7
        u    v    w
 
               4/7                  2/7
           (-1)                 (-1)
  {x -> --------------, y -> --------------, 
         1/7  2/7  4/7        4/7  1/7  2/7
        u    v    w          u    v    w
 
                 1/7
             (-1)
   z -> -(--------------)}, 
           2/7  4/7  1/7
          u    v    w
 
                 5/7                   6/7
             (-1)                  (-1)
  {x -> -(--------------), y -> --------------, 
           1/7  2/7  4/7         4/7  1/7  2/7
          u    v    w           u    v    w
 
                 3/7
             (-1)
   z -> -(--------------)}, 
           2/7  4/7  1/7
          u    v    w
 
               6/7                    3/7
           (-1)                   (-1)
  {x -> --------------, y -> -(--------------), 
         1/7  2/7  4/7          4/7  1/7  2/7
        u    v    w            u    v    w
 
                 5/7
             (-1)
   z -> -(--------------)}}
           2/7  4/7  1/7
          u    v    w
Input := 

jacobi=Outer[D,{x,y,z}/.ratkaisu[[2]],{u,v,w}]
Output =

         -1                -2                -4
{{----------------, ----------------, -----------------}, 
     8/7  2/7  4/7     1/7  9/7  4/7     1/7  2/7  11/7
  7 u    v    w     7 u    v    w     7 u    v    w
 
          -4                 -1                -2
  {-----------------, ----------------, ----------------}, 
      11/7  1/7  2/7     4/7  8/7  2/7     4/7  1/7  9/7
   7 u     v    w     7 u    v    w     7 u    v    w
 
          -2                -4                 -1
  {----------------, -----------------, ----------------}}
      9/7  4/7  1/7     2/7  11/7  1/7     2/7  4/7  8/7
   7 u    v    w     7 u    v     w     7 u    v    w
Input := 

Det[jacobi]
Output =

    -1
----------
   2  2  2
7 u  v  w
Input := 


rajat={z^2==y,z^2==2y,x^2==z,x^2==2z,y^2==x,y^2==2x}
Output =

  2        2          2        2          2        2
{z  == y, z  == 2 y, x  == z, x  == 2 z, y  == x, y  == 2 x}
Input := 


For[i=1,i<=6,i++,Print[
   Solve[{rajat[[i]],x==u y^2,y==v z^2,z==w x^2},{u,v,w}]]]
       x                z
{{u -> --, v -> 1, w -> --}}
        4                2
       z                x
       4 x       1       z
{{u -> ---, v -> -, w -> --}}
        4        2        2
       z                 x
       x        y
{{u -> --, v -> --, w -> 1}}
        2        4
       y        x
       x        4 y       1
{{u -> --, v -> ---, w -> -}}
        2        4        2
       y        x
               y        z
{{u -> 1, v -> --, w -> --}}
                2        4
               z        y
       1       y        4 z
{{u -> -, v -> --, w -> ---}}
       2        2        4
               z        y
Input := 

Integrate[-Det[jacobi],{u,1/2,1},{v,1/2,1},{w,1/2,1}]
Output =

1
-
7
Input :=