Page 218 - Applied Numerical Methods Using MATLAB
P. 218

PROBLEMS   207
                for five different sets of data rates

                a = [32 32 32 32], [643232 32], [128 32 32 32], [256 32 32 32], and [512 32 32 32]

                and plots a 1 /x 1 (the number of subchannels assigned to user 1) versus a 1
                (the data rate of user 1).

            4.10 Temperature Rising from Heat Flux in a Semi-infinite Slab
                Consider a semi-infinite slab whose temperature rises as a function of posi-
                tion x> 0 and time t> 0as

                                 
    2
                             Qx    e −s                  2    2
                     T(x, t) =     √   − erfc(s)   with  s = x /4at    (P4.10.1)
                              k     πs
                where the function erfc() is defined by Eq. (P4.9.3) and

                                         2
                                                                         ◦
                    Q(heat flux) = 200 J/m s,  k (conductivity) = 0.015 J/m/s/ C,
                                              2
                    a(diffusivity) = 2.5 × 10 −5  m /s
                In order to find the heat transfer speed, a heating system expert, Kyung-
                won, wants to solve the above equation to get the positions x(t) with a
                                        ◦
                temperature rise of T = 30 Cat t = 10:10:200 s. Compose the program
                which does this job and plots x(t) versus t.
            4.11 Damped Newton Method for a Set of Nonlinear Equations
                Consider the routine “newtons()”, which is made for solving a system of
                equations and introduced in Section 4.6.
                (a) Run the routine with the initial point (x 10 ,x 20 ) = (0.5, 0.2) to solve
                    Eq. (4.6.5) and certify that it does not yield the right solution as depicted
                    in Fig. 4.6c.
                (b) In order to keep the step size adjusted in the case where the norm of the
                    vector function f(x k+1 ) at iteration k + 1 is larger than that of f(x k ) at
                    iteration k, insert (activate) the statements numbered from 1 to 6 of the
                    routine “newtons()” (Section 4.6) by deleting the comment mark (%)at
                    the beginning of each line to make a modified routine “newtonds()”,
                    which implements the damped Newton method. Run it with the initial
                    point (x 10 ,x 20 ) = (0.5, 0.2) to solve Eq. (4.6.5) and certify that it yields
                    the right solution as depicted in Fig. 4.6d.
                (c) Run the MATLAB built-in routine “fsolve()” with the initial point
                    (x 10 ,x 20 ) = (0.5, 0.2) to solve Eq. (4.6.5). Does it present you a right
                    solution?
   213   214   215   216   217   218   219   220   221   222   223