Anda di halaman 1dari 6

1.

The equation of a reflected wave in a harbour is given by:


If :
, use the method of False Position to find the lowest
positive value of , with an accuracy of 2 significant decimal digits, that makes

Solution:
The equation to solve in

is:

) , i.e.:

Therefore the function of which we have to find the lowest positive zero is :

To used the False Position methos we need an interval in whose ends the function
changes its sign.
After some trials we found out that:
and
.
Therefore [6,8] is a suitable interval for the False Position method (or in other words
there must be one zero, at least, between 6 and 8).
The iterative formula of False Position is:
Applying iteratively the formula we obtain the flowing table:
6.00
6.59
6.66

0.21
0.03
0.00

8.00
8.00
8.00

The solution is

2.

(2.0)
Given the following MATLAB code:
function [S] =errfunc(x)
S=0
FAC=1
n=0
s=10

-0.50
-0.50
-0.50

6.59
6.66
6.66

0.03
0.00

while abs(s)>0.05
s=(-1)^n*x^(2*n+1)/FAC/(2*n+1)
S=S+s
n=n+1
FAC=FAC*n
end
S=2/pi^0.5*S

that computes the err function, which result do we obtain if we


make the following call in the Command Windows?:
>>errfunc(0.5)
SOLUTION :
x=0.5
S=0
FAC=1
n=0
s=10

We evaluate the condition abs(s)>0.05. As abs(s)=10


the condition is true , therefore the program goes
ahead
s=(-1)^0*0.5^1/1/1=0.5
S=S+s=0+0.5=0.5
n=n+1=0+1=1
FAC=FAC*n=1*1=1
As we have reached the end we evaluate again the
condition : abs(s)>0.05. It is true again since s=0.5
so we continue until the end command:
s=(-1)^1*0.5^3/1/3=-0.04
S=S+s=0.5-0.04=0.46
n=n+1=1+1=2
FAC=FAC*n=1*2=2
As we have reached the end we evaluate again the
Condition: abs(s)>0.05. It is false since abs(s)=0.04
Therefore we continue after the end command
S=(2*pi)^0.5*S=1.63
The answer is therefore :
3.
Given the following tabulated function:
-2
-0.5
7
1.75

1
1

2.5
4.75

a) Compute the Divided Finite Differences


b) Obtain the Collocation Polynomial by the Newton Method (express the final result
of the polynomial in canonical form (
)

SOLUTION:

-2

-0.5

1.75

2.5

4.75

-3.5
1
-0.5

0
1

2.5

As the order of the non-zero maximum order divided finite difference is 2 the
degree of the collocation polynomial is 2.
Applying the Newton formula:

The answer is therefore


4. (1.5)
Solve the following system of equations by the Gauss triangulation method:

SOLUTION:
We put the system in matrix form:

)( )

As the size of the system is 3 we need 2 steps:


1st step:
Pivot equation 1st equation:
Pivot coefficient :
1st row (equation ) as it is:

2nd row (equation)


Factor:

2nd row (equation) after 1st step

3rd row (equation) still in the first step


Factor:

We have fished with first step


Matrix and Independent terms Vector after first step:

2nd step
Pivot equation 2nd equation
Pivot coefficient
1st and 2nd rows (equations) as they are:

3st row (equation)


Factor:

We have finished with the triangulation


The system to solve by means of an ascending substitution algorithm is:

)( )

5. (1.5)
Compute a numerical value for:

considering the interval


divided into subintervals of same amplitude and
applying:
Simpson 1/3 rule (multiple application) to the six first subintervals (between y )
Simpson 3/8 rule (single application) to the remaining subintervals (between y

SOLUTION:
Since the number of subintervals is 9 , the amplitude of each one is:
We build the table:

0
0.5
1
1.5
2
2.5
3
3.5
4
4.5

0
0.39
0.61
0.71
0.74
0.72
0.67
0.61
0.54
0.47

Applying the 1/3 Simpson Rule to the first 6 subintervals:


[

Applying the 3/8 Simpson Rule to the remaining three subintervals:

The solution is

6. (1.5)
Giving the ordinary differential equation:
(

With the initial condition


Compute with a step size
order Runge-Kutta method

a numerical value of

for

SOLUTION:
We put the equation in the form
(

We need only one step to calculate

from

with a step size

Computation of
1.82
(

Therefore the value of

can be estimated:

using the 4th

Anda mungkin juga menyukai