BIL 108E Introduction to S cientific and Engineering Com

!
"
#
2 * ( x + 3)
y= 2
x + 6x + 9
2
Consider this
equation
2 * ( x + 3)
y= 2
x + 6x + 9
2
This looks like a
fairly complicated
function of x
2 * ( x + 3)
2 * ( x + 6 x + 9)
y= 2
=
=2
2
x + 6x + 9
( x + 6 x + 9)
2
2
If you expand it, it simplifies dramatically
$
2 * ( x + 3)
y= 2
x + 6x + 9
2
Let x equal -3
2 * (−3 + 3) 2
0
y=
= 2 * = undefined
9 − 18 + 9
0
When x is equal to -3, the equation is undefined
%
&
'
!
'
(
(#
!
'
)
#
&
*
!
!
++',
./01 23 /24 03 &
5
#$% &
*
"
3 /
6
++
' ( %)*
!
++) )*
)
+'
( %
++
#
,
-
- .
/
( %
%0 1 ,
2
++
++ , /
7
,
-3 4 5
8
++
-5
,
,
%0
3
'
2
,
5
9
:
;
,0
, /23 4 <3 3 # - 5
05
, =3 4><3 />6
25
75 ?)
,75/23 4 <3753 # - 5
43
'5
' &&
5
'5
'5
5
)
'
)
'
.&
(
;
'
>>expand((x-2)*(x-4))
ans= x^2-6*x+8
>>expand(cos(x+y))
ans= cos(x)*cos(y)-sin(x)*sin(y)
>>factor(
- 53 - 5@ - 53
, -4 5
- 55
!
"#
$
#
#
#
#
#
$
#
!
#
"!
%
%
#
#
%
%
%
%
$
,1
"
""#
# &
"
$
%
"
$
%
%
%
"
$
%
%
"
$
$
"
&
"
#
!
"#
$
' (
#
#
')
%
%
%
#
%
*
#
#!
#
"# '
%
*
+
,
(
3
6
73 5
6
6 1
#
A
'
6 18
18
19
'
)
#
++ #>,B@0,CB
++
- #>5
,
D
++ #2,B/2@ @E,AB
++
- #25
,
0
@2
++ #>,B/24 /2,>B
++ #2,B4 ,>B
++ F
,
>
A
,
A
>
G
,
- #> #25
73 5
++ F
,
>
A
,
A
>
G
,
6
B/24 /2,>BB4 ,>B
5
:/ 5
;
*
7 ' F
5
@2π
G
5
42π
Notice that ezplot
creates a title and
axis labels
automatically
Add your own titles,
axis labels and other
annotations using the
same functions
++
++ ,
<3 5
++
-5?
,
<3 <3 5
++ ,
-5
3 -5
++
-5
,
-5
3 -5
@
-5
3
:
++
- 25
,
@23 - 5
3 -5
++
- -5
5
,
@23 - 5
3 -5
-5
<
) 3
35/ 5
5
+
5
5
-
5
@
? *
, @>AH>H
>A ?
> , - - 56 5/2 ? I
?
2 , 03 - - 5
5
2 > >5 ? *
- >
25 ? K
2 > 25 ? K
- >
25
I
#
> 2
J>
= 5
0 5
? $
, @0H2H
0
,
>AAA >5
? L
- 5
L
5
/ 5.5
0
"
! " # ! # $ $