07 R. Robert Gajewski: Mathcad Prime 4 0. Calculate numerically and present results in different formats and precision. 0. Oblicz numerycznie i przedstaw wyniki w różnych formatach i z różną precyzją. 3 sin π - 3 3 4 ln e 4 + 3 4 3 sin - 3 3 = 0.5800 4 ln 4 + 3 4-3 5-6 ln e 3 4 sin π 6-3 = 5-6 ln 3 4 sin 3.33333 0-6 - 3-3 3 47 3 47 ln e - sin π = 99.979 0-3 ln - sin 6 6
07 R. Robert Gajewski: Mathcad Prime 4 08. Calculate values of the following integrals 08. Oblicz wartości ponższych całek tan ( x) tan dx ( x) dx = -.377859 cos (x) cos (x) dx dx =.5708 - x - x 0 0 π 4 cos ( x) cos ( x) dx dx = 49.4 0-3 cos (x) ( + x) cos (x) ( + x) 0 0 4
3 07 R. Robert Gajewski: Mathcad Prime 4 09. Calculate values of derivatives for x= 09. Oblicz wartości pochodnej dla x= x d dx sin ( 3 x) 4 cos ( x) d = dx sin ( 3 x).54698 4 cos( x) d dx ln x + x + d dx ln x + = -66.667 0-3 x + 3 d dx ( x- i) d = i= dx ( x- i) i= 3 (x)
4 07 R. Robert Gajewski: Mathcad Prime 4 0. Calculate sums of n elements of series 0. Oblicz sumy n wyrazów ciągów liczbowych n 5 i n n + + 3 +. i = 5 + + 3+ 4+ 5= 5 i= n + 3+ 5 +. ( i - ) = 5 + 3+ 5+ 7+ 9= 5 i= n + 4+ 8 +. i = 6 + 4+ 8+ 6+ 3= 6 + + +. = 0.38 3 3 4 3 4 5 i i ( i + ) ( i + ) i= + + +. = 0.595 + + + + = 0.595 3 4 3 5 i i ( i + ) 3 4 3 5 4 6 5 7 + + +. = 0.833 + + + + = 0.833 3 3 4 i i ( i + ) 3 3 4 4 5 5 6
5 07 R. Robert Gajewski: Mathcad Prime 4 4b. Perform calculations fo given data - create function and units if necessary. Display results of calculations in dm. 4b. Przeprowadź obliczenia dla podanych danych - utwórz funkcję i jednostki jeśli to konieczne. Podaj wynik obliczeń w decymetrach. a 90 b.3 α 60 P ( b, b, kat) b b sin (kat) pole P ( a, b, α) = 0.959 0. pole = 95.869
6 07 R. Robert Gajewski: Mathcad Prime 4 5. Create and format plots of the following functions. Three roots should be visible Using range variables calculate values of functions in the range [a,b]. 5. Zdefiniuj poniższe funkcjei, utwórz ich wykresy i sformatuj je. Powinny być widoczne trzy pierwiastki. Korzystając ze zmiennej zakresowej wyznacz wartości dla przedziału [a,b]. f (x) x 3 + x - x - 0.9 n 5 a -3 b 3 krok b- a n xx a, a+ krok b f (x) =x 3 + x - x - 0.9 3 0-3 - - 0 3 - - f (x) f (xx) -3 x xx
7 07 R. Robert Gajewski: Mathcad Prime 4 Create plot using parametric representation Utwórz wykres korzystając z reprezentacji parametrycznej 9 ( x - ) + 4 ( y + ) =36 ( x - ) ( y + ) + = 4 9 sin (r) + cos (r) = = x - sin (r) y + =cos (r) 3 x = sin (r) + y=3 cos (r) - 0 - - 0 3 4 - - -3-4 3 cos(r) - Sprawdzenie... -5 7 4 =.598 0 =.49 9 sin(r) + x=0 4 ( y + ) =36-9=7 ( y + ) = 7 4 y=0.598 y=-.598 y=0 9 ( x - ) =36-4 4=0 ( x - ) = 0 9 x=.49 x=-0.49
8 07 R. Robert Gajewski: Mathcad Prime 4 6. For the functions from the previous point find two roots closest to 0 one positive and one negative. Calculate the positive root using interval and the negative one using guess value. Compare accuracy of results. 6. Dla funkcji z poprzedniego polecenia wyznacz dwa pierwiastki najbliższe 0 - jeden dodatni i jeden ujemny. Wyznacz pierwiastek dodatni określając przedział a ujemny zgadując jego wartość. Porównaj dokładnośc wyników. f (x) =x 3 + x - x - 0.9 f (x) x 3 + x - x - 0.9 x ( f (x), x, -, 0) = -0.76 3 x x ( f (x), x) = 0.974 0-3 - - 0 3 - f (x) - -3 x
9 07 R. Robert Gajewski: Mathcad Prime 4 0. Generate the following matrices using the minimal number of operations. Do not insert all elements manually! 0. Utwórz (wygeneruj) poniższe macierze wykonując możliwie najmniejsza liczbę operacji. Nie wprowadzaj wszystkich elementów ręcznie z klawiatury. n 5 i n j n 3 4 5 3 4 5 c9= 33 34 35 3 44 45 3 4 55 3 4 5 3 4 5 c9 i, j ( i j, 0 i+ j, j) c9 = 33 34 35 3 44 45 3 4 55 0 0 0 0 0 0 0 0 c8= 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c8 i, j ( i+ j =n +,, 0) c8 = 0 0 0 0 0 0 0 0 0 0 0 0
0 07 R. Robert Gajewski: Mathcad Prime 4. Find at least one value of parameter for which matrices are singular. Znajdź co najmniej jedną wartośc parametu p dla którego macierz jest osobliwa. p p 0 cos (p) p - p p A (p) 0 cos(p) p - wa (p) A (p) 3.5 9 4.5 0-5 -4-3 - - 0 3 4 5-4.5 p ( wa (p), p, -3, -) = -.686 p 4 p ( wa (p), p) = 4.5-9 -3.5 wa (p) -8 -.5-7 -3.5 p
07 R. Robert Gajewski: Mathcad Prime 4 3. Calculate n partial sums of the following series using only one formula. The number of summed elements for subsequent sums is specified in [ ]. Store results in the form of a vector. Let n=5... 3. Oblicz n sum częściowych dla poniższych ciągów liczbowych (szeregów) używając tylko jednego wzoru. Liczba sumowanych wyrazów dla poszczególnych sum jest zawarta w nawiasach [...]. Wyniki zapisz w wektorze. Niech n=5... [ 4 8 6. ] n 5 i n g - i i T = g [ 4 8 6] + + + +. s 3 4 i g i j= j T s = [.5.083.78 3.38 ]
07 R. Robert Gajewski: Mathcad Prime 4 04. Calculate limits and present in simpliest form 04. Oblicz granice i przedstaw w najprostszej postaci lim n -3 n 4 n - 5 lim -3 n 4 n - 5 simplify - n lim x x - 5 x - lim x - 5 x - simplify x lim y 0 - cos (y) cos ( y) y - cos (y) cos ( y) simplify 3 lim y 0 y
3 07 R. Robert Gajewski: Mathcad Prime 4 05. Calculate derivatives and present them in simpliest form 05. Oblicz pochodne i przedstaw wyniki w najprostszej postaci d dy ln y + y - d dy ln y + simplify 4 y - y - y 4-4 d dx sin (x) 3 cos ( x) cos ( 3 x) d cos dx sin(x) simplify (x) - 3 3 cos( x) cos ( x) d sin ( 3 y) e d simplify sin( 3 y) 6 cos( 3 y) dy dy
4 07 R. Robert Gajewski: Mathcad Prime 4 06. Calculate integrals and present them in simpliest form 06. Oblicz całki i przedstaw je w najprostszej postaci dx 5 x - dx simplify 5 x - 5 x - 5 d 3 + z 3 z 3 + 3 z + 5 z d 3 z + 3 z 3 + 3 z + 5 z simplify ln z 3 + 3 z + 5 x e x x dx x dx simplify x ( x - )
5 07 R. Robert Gajewski: Mathcad Prime 4 07. Perform the following symbolic calculations 07. Przeprowadź poniższe obliczenia symboliczne a. rewrite expressions a. zapisz w inny sposób cos: sin (x) sin (x) rewrite, cos - cos(x) b. simplify expressions b. uprość wyrażenia x + ( + x) + ( 5 - x) 3 x + ( + x) + ( 5 - x) 3 simplify 6 x - x 3-70 x + 9 d. collect terms d. zgrupuj wyrazy a: a b + ( a+ b) ( a, b) a b + ( a+ b) collect, a ( b + ) a + b a+ b
6 07 R. Robert Gajewski: Mathcad Prime 4 07. Perform the following symbolic calculations 07. Przeprowadź poniższe obliczenia symboliczne e. expand expression e. rozwiń wyrażenia ( a+ b) ( a+ b) expand a + a b+ b f. factor expressions f. wykonaj faktoryzację wyrażeń (rozkład na czynniki) w 3 + w - 3 w + 0 + w - 3 w + 0 factor ( w + 5) ( w - ) ( w - ) w 3 g. find coefficients of a polynomial g. znajdź współczynniki wielomianu 5 ( x - ) 4 - ( x - ) 4 - coeffs -3 4-8
7 07 R. Robert Gajewski: Mathcad Prime 4 07. Perform the following symbolic calculations 07. Przeprowadź poniższe obliczenia symboliczne h. Perform partial fraction decomposition h. Wykonaj rozkład na ułamki proste w + ( w - ) w - w + w + parfrac ( w - ) w - w + - w - w + + 3 w - w + ( w - ) i. Substitute variables: x=y+ i. Podstaw zmienne: x=y+ ( x + ) ( x+ y- 5) x y+ 4 substitute, x =y + ( x + ) ( x+ y- 5) simplify ( y - 3) ( y + 5) x y+ 4 y + y + j. Expand to series j. Rozwiń w szereg - x series, 5 + x+ x + x 3 + x 4 - x
8 07 R. Robert Gajewski: Mathcad Prime 4 5. For given vectors vx and vy find appropriate trend lines. Create plot. 5. Dla danych wektorów vx i vy znajdź linie trendu. Zilustruj wykresem. a. linear function (funkcja liniowa) vx = {,, 3, 4}, vy = {4., 4.9, 6., 7.} vx 3 4 4. 4.9 vy 6. 7. b 3 a line ( vx, vy) =.03 0 9 8 7 6 (x) 5 4 3 vy a x+ b 0 0 0.5.5.5 3 3.5 4 4.5 5 vx x
9 07 R. Robert Gajewski: Mathcad Prime 4 6. Find solution of linear equations using approriate function from group Solving. Check the solution calculating residua 6. Znajdź rozwiązanie liniowego układu równań korzystając z odpowieniej funkcji z grupy Solving. Sprawdź rozwiązanie wyznaczając residua. ln() 3.78 0.693 3 A cos (4) 5 sin (6) = -0.654 5-0.79 7 log(8) 9.646 0.903 9-0.087 x lsolve ( A, b) = 0.406 0.38 0 r A x- b= 0 0 b 3
0 07 R. Robert Gajewski: Mathcad Prime 4 6a. Solve set of equations symbolically and numerically for p= 6a. Rozwiąż układ równań symbolicznie i numerycznie dla p= p x = cos (p) x p A (p) cos (p) b x (p) A (p) - - cos - lsolve ( A (p), b) (p) p p - cos (p) - cos (p) - p - cos (p) - p cos (p) - p cos (p) cos (p) - p - p cos (p) - p x (p) A (p) - simplify - cos - b (p) p p - cos (p) - cos (p) - p 0.685 x () = 0.35
07 R. Robert Gajewski: Mathcad Prime 4 7. Find all roots of polynomial using appropriate function from group Solving. 7. Znajdź wszystkie pierwiastki wielomianu korzystając z odpowieniej funkcji z grupy Solving w =x 4 + x 3-3 x - 4 x+ 4 (x) p x 4 4 + x 3-3 x - 4 x + 4 coeffs -4-3 -4 - pr polyroots (p) = 3 w (x) + x 3-3 x - 4 x + 4 x 4 550 495 440 385 330 75 0 65 w (x) 0 55 0-5 -4-3 - - 0 3 4 5-55 x
07 R. Robert Gajewski: Mathcad Prime 4 8. Find intersection points for pairs of curves. 8. Znajdź punkty przecięcia par krzywych. x + y =9 y =sin (x) + x ( x, r) Guess Values x y 3 3 Constraints x + y =9 y =sin (x) + x 0-3 - - 0 3 3 sin(r) Solver x y 0.995 ( x, y) =.83 - - -3 + sin (x) x Guess Values x - y -3 3 cos(r) x Constraints Solver x + y =9 y =sin (x) + x x -0.995 y ( x, ) = -.83
3 07 R. Robert Gajewski: Mathcad Prime 4 Find intesection of ellipse with axes Znajdź punkty przecięcia elipsy z osiami 9 ( x - ) + 4 ( y + ) =36 0 - - 0 3 4 - Guess Values Constraints Solver x - y 0 y=0 9 ( x - ) + 4 ( y + ) =36 x (x) = -0.49 - -3-4 -5 sin(r) + 3 cos(r) - Guess Values Constraints Solver x 0 y x=0 9 ( x - ) + 4 ( y + ) =36 y ( ) = 0.598
4 07 R. Robert Gajewski: Mathcad Prime 4 9. Find the minimal distance between the curve and the point (, ) 9. Znajdź najmniejsza odległośc między krzywą a punktem (, ) y=e x P=[ ] vx [ ] vy [ ] d (x) ( x - ) + x - x x ( d, x) = 0.583 x y =.79 vx x vy y 3 vy x 0 0 3 vx x
5 07 R. Robert Gajewski: Mathcad Prime 4 30. Find the minimal distance between curves. 30. Znajdź najmniejsza odległość między krzywymi. y=e x y=-x d ( x, x) ( x - x) + x + x x -0.5 x -0. x -0.608 x x ( d, x, x) = -0.7 y y -x x y vx x vy y x 0-0 -x - x
6 07 R. Robert Gajewski: Mathcad Prime 4 3. Find one local miniumu and maximum of a given function closest to 0 3. Dla danej funkcji znajdź jedno lokalne miniumum i maksimum najbliższe 0 y= sin (x) e 0. x f (x) sin (x) 0. x x -5 x ( f, x) = -4.63 x - x ( f, x) = -.47 x3 x3 ( f, x3) =.67 x4-5.4.6 x4 ( f, x4) = -7.754. 0.8 0.4 0-0 -8-6 -4-0 4 6 8 0-0.4-0.8 -. -.6 - sin (x) 0. x x
7 07 R. Robert Gajewski: Mathcad Prime 4 9. For the given vector b calculate creating appropriate function... a. how many elements are greater than given value (parameter of fuction) 9. Dla danego wektora b wyznacz tworząc odpowiednią funkcję... a. ile elementów wektora jest większych niż dana liczba (parametr funkcji) ii 9 i ii b i i + i + T b = [.5.333.5..67.43.5.. ] function Main n = 0 loop i from 0 to 8 if w[i] > d then n = n + end if end loop output n end function f ( w, d) l length (w) n 0 for i l if w > d i n n + n f ( b,.) = 3
8 07 R. Robert Gajewski: Mathcad Prime 4 0. For the given matrix calculate creating appropriate function: 0. Dla danej macierzy oblicz tworząc odpowiednią funkcję i ( j + ) + j ( i+ ) ii 3 jj 9 i ii j jj A i, j 0 0.4 0.7.3.6.9..5.8 A = 0.7..7..7 3. 3.7 4. 4.7.7.4 3. 3.8 4.5 5. 5.9 6.6 a. how many elements are greater than d (a parameter of the function) and their sum a. ile jest elementów w macierzy większych niż d (parametr funkcji) i ich sumę f9 ( w, d) n 0 s 0 l length (w) for i l if w > d i n n + s s+ w i [ l n s] f0 ( M, d) n 0 s 0 r rows (M) c cols (M) for i r for j c if M > d i, j n n + s s+ M i, j [ n s] f0 ( A, 5) = [ 3 7.7 ]
9 07 R. Robert Gajewski: Mathcad Prime 4 3. Create functions calculating sums of series (elements). Add only elements greater than eps. 3. Utwórz funkcję obliczającą sumy wyrazów ciągów. Dodawaj elementy większe niż eps. +! +! +! 3 function Main input eps s = 0 i = 0 wyr = loop while wyr > eps s = s + wyr i = i + wyr = wyr / i end loop end function +. =e f4 (eps) s 0 i 0 r while r> eps s s+ r i i + r r i [ i - s ] f4 (0.00) = [ 6.78] f4 (0.000) = [ 7.78]
30 07 R. Robert Gajewski: Mathcad Prime 4 3. Create functions calculating sums of series (elements). Add only elements greater than eps. 3. Utwórz funkcję obliczającą sumy wyrazów ciągów. Dodawaj elementy większe niż eps. - + - +. = 4 8 3 function Main input eps s = 0 wyr = loop while Abs(wyr) > eps s = s + wyr wyr = -wyr / end loop end function f5 (eps) s 0 r while r > eps s s+ r r -r s f5 (0.000) = 0.667 - f5 (0.0000) = -5.086 0-6 3
3 07 R. Robert Gajewski: Mathcad Prime 4 3. Create functions calculating sums of series (elements). Add only elements greater than eps. 3. Utwórz funkcję obliczającą sumy wyrazów ciągów. Dodawaj elementy większe niż eps. + + +. = 3 3 4 function Main input eps s = 0 i = wyr = / ( * ) loop while wyr > eps s = s + wyr i = i + wyr = / (i * (i + )) end loop end function f7 (eps) s 0 i r while r> eps s s+ r i i + r i ( i + ) [ i - s ] f7 (0.00) = [ 3 0.969 ]
3 07 R. Robert Gajewski: Mathcad Prime 4 3. Create functions calculating sums of series (elements). Add only elements greater than eps. 3. Utwórz funkcję obliczającą sumy wyrazów ciągów. Dodawaj elementy większe niż eps. - + - +. = π 3 5 7 4 function Main input eps s = 0 i = znak = wyr = loop while Abs(wyr) > eps s = s + wyr i = i + znak = -znak wyr = znak / i end loop end function f6 (eps) s 0 i z r while r > eps s s+ r i i + z -z r z i i - s f6 (0.00) = [ 500 0.785 ]
33 07 R. Robert Gajewski: Mathcad Prime 4 5. Create functions expanding to the Taylor series the following functions: 5. Utwórz funkcje rozwijające w szereg Taylora poniższe funkcje: sin (x) =x - x3 + x5 - x7 +. 3! 5! 7! f8 ( x, eps) s 0 i r x while r > eps s s+ r i i + r -r x x ( i - ) i i - s f8 (, 0.) = [ 4-0.075 ] sin () = 0.84 f8 (, 0.00) = [ 3 0.84]