0% found this document useful (0 votes)
40 views9 pages

Complex Analysis Practical

The document contains worked examples of representing complex numbers in the form a + ib and calculating their real and imaginary parts. Graphical representations of the complex numbers are also shown on both rectangular and polar plots.

Uploaded by

Rohit Mandal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views9 pages

Complex Analysis Practical

The document contains worked examples of representing complex numbers in the form a + ib and calculating their real and imaginary parts. Graphical representations of the complex numbers are also shown on both rectangular and polar plots.

Uploaded by

Rohit Mandal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

In[ ]:= DateObject[{2021, 1, 15, 13, 39, 31.

5590838}]

Out[ ]= Fri 15 Jan 2021 13:39:31 GMT+5.5

Practical 1
Question-1) Write the following complex numbers and write their real and imaginary part. Give
graphical representation also.
(i) 3+4i
(ii) 11+5i
(iii) 7+2i
(iv) 7 - 2 i
(v) -13-5i
(vi) 5-2i

In[ ]:= z1 = 3 + 4 * I
Out[ ]= 3+4ⅈ

In[ ]:= Re[z1]


Out[ ]= 3

In[ ]:= Im[z1]


Out[ ]= 4

In[ ]:= ListLinePlot[{{0, 0}, {Re[z1], Im[z1]}},


Joined -> True, PlotStyle → {Red, Thick}, ImageSize → {200}]
4

Out[ ]= 2

0.5 1.0 1.5 2.0 2.5 3.0

In[ ]:= z2 = 11 + 5 * I
Out[ ]= 11 + 5 ⅈ

In[ ]:= Re[z2]


Out[ ]= 11

In[ ]:= Im[z2]


Out[ ]= 5
2 P-1.nb

In[ ]:= ListLinePlot[{{0, 0}, {Re[z2], Im[z2]}},


Joined -> True, PlotStyle → {Blue, Dashed}, ImageSize → {200}]
5

3
Out[ ]=
2

2 4 6 8 10

In[ ]:= z3 = 7 + 2 I
Out[ ]= 7+2ⅈ

In[ ]:= Re[z3]


Out[ ]= 7

In[ ]:= Im[z3]


Out[ ]= 2

In[ ]:= ListLinePlot[{{0, 0}, {Re[z3], Im[z3]}},


Joined -> True, PlotStyle → {Purple, Dotted}, ImageSize → {200}]
2.0

1.5

Out[ ]= 1.0

0.5

1 2 3 4 5 6 7

In[ ]:= z4 = 7 - 2 I
Out[ ]= 7-ⅈ 2

In[ ]:= Re[z4]


Out[ ]= 7

In[ ]:= Im[z4]

Out[ ]= - 2

In[ ]:= ListLinePlot[{{0, 0}, {Re[z4], Im[z4]}}, Joined -> True,


PlotStyle → {Brown, Thickness[0.01]}, ImageSize → {200}]
1 2 3 4 5 6 7
-0.2
-0.4
-0.6
Out[ ]=
-0.8
-1.0
-1.2
-1.4

In[ ]:= z5 = - 13 - 5 I
Out[ ]= - 13 - 5 ⅈ
P-1.nb 3

In[ ]:= Re[z5]


Out[ ]= - 13

In[ ]:= Im[z5]


Out[ ]= -5

In[ ]:= ListLinePlot[{{0, 0}, {Re[z5], Im[z5]}},


Joined -> True, PlotStyle → {Yellow, ToString}, ImageSize → {200}]
-12 -10 -8 -6 -4 -2
-1

-2
Out[ ]=
-3

-4

-5

In[ ]:= z6 = 5 - 2 I
Out[ ]= 5-2ⅈ

In[ ]:= Re[z6]


Out[ ]= 5

In[ ]:= Im[z6]


Out[ ]= -2

In[ ]:= ListLinePlot[{{0, 0}, {Re[z6], Im[z6]}},


Joined -> True, PlotStyle → {Red, Thick}, ImageSize → {200}]
1 2 3 4 5

-0.5

Out[ ]= -1.0

-1.5

-2.0

Question 2) For the following array of complex numbers find real and imaginary part.

(i) z1=8-5*I, z2=15+7*I, z3=9-4*I

In[ ]:= ClearAll


Out[ ]= ClearAll

In[ ]:= z1 = 8 - 5 * I
Out[ ]= 8-5ⅈ

In[ ]:= z2 = 15 + 7 * I
Out[ ]= 15 + 7 ⅈ

In[ ]:= z3 = 9 - 4 * I
Out[ ]= 9-4ⅈ
4 P-1.nb

In[ ]:= Re[List[z1, z2, z3]]


Out[ ]= {8, 15, 9}

In[ ]:= Im[List[z1, z2, z3]]


Out[ ]= {- 5, 7, - 4}

In[ ]:= ListLinePlot[


{{{0, 0}, {Re[z1], Im[z1]}}, {{0, 0}, {Re[z2], Im[z2]}}, {{0, 0}, {Re[z3], Im[z3]}}},
Joined -> True, PlotStyle → {Red, Green, Blue}, ImageSize → {200}]

6
4
2
Out[ ]=

2 4 6 8 10 12 14
-2
-4

(ii) z4 = 7 - 2 i, z5 = -13 - 5 i, z6 = 5 - 2 i

In[ ]:= z4 = 7 - 2 I
Out[ ]= 7-ⅈ 2

In[ ]:= z5 = - 13 - 5 I
Out[ ]= - 13 - 5 ⅈ

In[ ]:= z6 = 5 - 2 I
Out[ ]= 5-2ⅈ

In[ ]:= Re[List[z4, z5, z6]]


Out[ ]= {7, - 13, 5}

In[ ]:= Im[List[z4, z5, z6]]

Out[ ]= - 2 , - 5, - 2

In[ ]:= ListLinePlot[


{{{0, 0}, {Re[z4], Im[z4]}}, {{0, 0}, {Re[z5], Im[z5]}}, {{0, 0}, {Re[z6], Im[z6]}}},
Joined -> True, PlotStyle → {Red, Green, Blue}, ImageSize → {200}]
-6 -4 -2 2 4 6
-1

-2
Out[ ]=
-3

-4

-5

Question-3) Write the following in form of a+ib and find real imaginary also argument. Also give
graphical representation (Both Polar and Complex).

1
(i) 2 + i - 3-i
P-1.nb 5

1
In[ ]:= z1 = 2 + I -
3-I
17 9ⅈ
Out[ ]= +
10 10

In[ ]:= Re[z1]


17
Out[ ]=
10

In[ ]:= Im[z1]


9
Out[ ]=
10

In[ ]:= Arg[z1]


9
Out[ ]= ArcTan 
17

In[ ]:= Abs[z1]

37
Out[ ]=
10

In[ ]:= ListLinePlot[{{0, 0}, {Re[z1], Im[z1]}},


PlotStyle → {Red, Dashed, Thick}, ImageSize → {200}]

0.8

0.6

Out[ ]=
0.4

0.2

0.5 1.0 1.5

In[ ]:= ListPolarPlot[{{0, 0}, {N[Arg[z1]], N[Abs[z1]]}},


PlotStyle → Blue, Joined → True, ImageSize → {300}]

0.8

0.6

Out[ ]=
0.4

0.2

0.5 1.0 1.5


6 P-1.nb

In[ ]:= Graphics[{PointSize[0.02], Point[{Re[z1], Im[z1]}],


{Red, Arrow[{{0, 0}, {Re[z1], Im[z1]}}]}}, Axes → True, ImageSize → {300}]

0.8

0.6

Out[ ]=
0.4

0.2

0.5 1.0 1.5

5*I
(ii) z2= 2+3 I

5*I
In[ ]:= z2 =
2+3I
15 10 ⅈ
Out[ ]= +
13 13

In[ ]:= Re[z2]


15
Out[ ]=
13

In[ ]:= Im[z2]


10
Out[ ]=
13

In[ ]:= Arg[z2]


2
Out[ ]= ArcTan 
3

In[ ]:= Abs[z2]


5
Out[ ]=
13

In[ ]:= ListLinePlot[{{0, 0}, {Re[z2], Im[z2]}},


PlotStyle → {Red, Dashed, Thick}, ImageSize → {200}]
0.8

0.6

Out[ ]= 0.4

0.2

0.2 0.4 0.6 0.8 1.0


P-1.nb 7

In[ ]:= ListPolarPlot[{{0, 0}, {N[Arg[z2]], N[Abs[z2]]}},


PlotStyle → Blue, Joined → True, ImageSize → {300}]

0.6

0.4
Out[ ]=

0.2

0.2 0.4 0.6 0.8 1.0

In[ ]:= Graphics[{PointSize[0.02], Point[{Re[z2], Im[z2]}],


{Red, Arrow[{{0, 0}, {Re[z2], Im[z2]}}]}}, Axes → True, ImageSize → {300}]

0.6

0.4
Out[ ]=

0.2

0.2 0.4 0.6 0.8 1.0

1+I
(iii) z3= 2-5*I

1+I
In[ ]:= z3 =
2-5*I
37ⅈ
Out[ ]= - +
29 29

In[ ]:= Re[z3]


3
Out[ ]= -
29

In[ ]:= Im[z3]


7
Out[ ]=
29

In[ ]:= Arg[z3]


7
Out[ ]= π - ArcTan 
3
8 P-1.nb

In[ ]:= Abs[z3]

2
Out[ ]=
29

In[ ]:= ListLinePlot[{{0, 0}, {Re[z3], Im[z3]}},


PlotStyle → {Red, Dashed, Thick}, ImageSize → {200}]
0.25

0.20

0.15
Out[ ]=
0.10

0.05

-0.10 -0.08 -0.06 -0.04 -0.02

In[ ]:= ListPolarPlot[{{0, 0}, {N[Arg[z3]], N[Abs[z3]]}},


PlotStyle → Blue, Joined → True, ImageSize → {300}]

0.20

0.15

Out[ ]=

0.10

0.05

-0.10-0.08-0.06-0.04-0.02
P-1.nb 9

In[ ]:= Graphics[{PointSize[0.02], Point[{Re[z3], Im[z3]}],


{Red, Arrow[{{0, 0}, {Re[z3], Im[z3]}}]}}, Axes → True, ImageSize → {300}]

0.20

0.15

Out[ ]=

0.10

0.05

-0.10 -0.08 -0.06 -0.04 -0.02

(iv)

You might also like