Sie sind auf Seite 1von 5

Drill Problems 1.

4
1. Using the Eulers formula, the trigonometric and hyperbolic functions for
the complex number

z=x + jy can be established, and will show that the

two functions are actually related thru the complex number. Derive a
formula t find the following:

sinh ( x+ jy ) ; cosh ( x + jy ) ; sin ( x + jy )

and

cos ( x + jy) , and then create a VI that would numerically prove your
derivations. Name the VI as TrigAndHyp.vi

2. De Moivres theorem is a formula that is useful in finding the power and


roots of complex numbers. It is stated as


+ j sin
cos

n
r

n
n
z =( x + jy) =
For fractional n, the right-hand side expression is multivalued and becomes

+ j sin
cos

+2 k
n
r

1/ n
1/ n
z =( x + jy) =
where

k =0,1,2 . n1 . Build a VI that computes the fourth root if a

complex number. The user is allowed to input numbers: the real part and the
imaginary part of the complex number z. The VI must solve the four roots of
the number z, in complex number form. Implement the VI in two ways:
a. Using trigonometric functions (name the VI as DeMoivreTrig.vi)
b. Using complex number functions (name the VI as
DeMoivreComplex.vi)

3. The Taylor series expansion for the hyperbolic sine function is given as

sinh x=x+

x3 x5 x7
x 2 n+1
+ + +=
3 ! 5! 7 !
n=0 ( 2n+1 ) !

While for the hyperbolic cosine is

x2 x4 x6
x2 n
cosh x =1+ + + + =
2! 4! 6!
n =0 ( 2 n ) !
Where n is the number of terms to be added to the series. Create a VI that
would compute the sum of the first ten terms of the Taylor series expansion
for the hyperbolic sine and hyperbolic cosine of an input x, calling this VI as
HypTaylor.vi. Use While-loop, and follow the following steps
1. Input x

2. For the first iteration ( i=0 , compute the first term of the series
3. Store the first term into the shift register.
4. For the second iteration

( i=0 ) , compute the second term of the series.

Add this to the first term stored in the shift register and save their sum
into the shift register
5. Repeat step 4 until the number of iterations reaches 10

(i=9)

6. Display the sum


For comparison, compute the hyperbolic sine and hyperbolic cosine. Notice
that as x grows larger, the discrepancy between the Taylor series generated
and the function generated values grows larger.

4. Simulate the following random events by creating a VI:


a. Tossing of coins. The output should either be a Head or a Tail. Call
the VI as TossCoin.vi

b. Tossing of a dice. The output should be an integer number from 1 to 6.


Call the VI as Dice.vi

c. Selecting six numbers out of 55 numbers from 1 to 55. The output is


an array of six numbers picking six numbers to place a bet on the
lottery. Call the VI as Lotto655.vi. Note that the VI might return
repeated numbers in an array. This will be okay for now.
5. Determine the lowest positive root of

f ( x )=8 e sin ( x )1

a. Using Netwon-Rhapson method


b. Using fixed-point iteration. Use the fixed-point iteration formula

x i+1=x i +8 ex sin ( x i )1
i

Determine the root correct to three decimal places. Also, determine how
many iterations are required for each method. Which method arrives at
the answer faster?

Self Assessment: Rate your level of achievement for the following outcomes:
Can Marginal Acceptabl Exception
Outcome
t
Performa
e
al
do
nce
Performa Performa
(1)
nce
nce
(0)
(2)
(3)
Use LabVIEWs different elementary
math, statistical and complex number
functions
Use while loops with shift register
and tunnels with different modes

Das könnte Ihnen auch gefallen