1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 12: Algebraic Systems"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.17: Roots_of_polynomial.sci"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"t=poly(0,'t');\n",
"f=t^3+t^2-8*t+4\n",
"g=factors(f)\n",
"disp(r=roots(f),'roots of f(t) are as follows:')\n",
"\n",
"t=poly(0,'t');\n",
"h=t^4-2*t^3+11*t-10\n",
"disp(r=roots(h),'the real roots of h(t) are 1 and -2')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.18: Roots_of_polynomial.sci"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"t=poly(0,'t');\n",
"f=t^4-3*t^3+6*t^2+25*t-39\n",
"g=factors(f)\n",
" disp(r=roots(f),'roots of f(t) are as follows:')"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12.4: Properties_of_operations.sci"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"a=(8-4)-3\n",
"b=8-(4-3)\n",
"disp('since a and b are not equal so subtraction is non-commutative on Z(set of integers)')\n",
"\n",
"a=[1 2;3 4]\n",
"b=[5 6;0 -2]\n",
"g= a*b\n",
"k= b*a\n",
"disp('since g and k are not equal matrix multiplication is non-commutative')\n",
"\n",
"h=(2^2)^3\n",
"j=2^(2^3)\n",
"disp('since h and j are not equal so exponential operation is non associative on the set of positive integers N')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|