An Introduction To Mathematica Electronic Version Only

9.2.2 Exact vs. Approximate Results 9.2.6 The Function N and Arbitrary-Precision Numbers Exercises for Sec. 9.2 9.3 The Mathematica Front End and Kernel 9.4.3 Pallets and Keyboard Equivalents 9.5 Lists, Vectors, and Matrices 9.5.1 Defining Lists, Vectors, and Matrices 9.5.2 Vectors and Matrix Operations 9.5.3 Creating Lists, Vectors, and Matrices with the Table Command 9.5.4 Operations on Lists Exercises for Sec. 9.5 9.6.3 Plotting Several Curves on the Same Graph 9.6.8 Add-On Packages...

Info Bll

b This problem is amenable to WKB analysis, provided that v c. The solution can be written in the approximate form y x, t Re C x, t e-iI 0d' sin tx, where t tc L t , and C x, t is a relatively slowly varying complex amplitude. In the limit that v c 1, show that C x, t satisfies the following first-order PDE tan t x -i Lj dx r x 2tan t x lc . c First-order PDEs of this type can be solved analytically using the method of characteristics. See Chapter 7. DSolve can also solve this PDE...

Numerical Solution of BoundaryValue Problems The Shooting Method

For the simple cases discussed above, general analytic solutions to the ODEs could be found, and the boundary-value problem could be solved analytically when the solution existed . However, we have already seen that there are many ODEs for which no general analytic solution can be found. In these cases numerical methods must be employed. This section will consider one method that can be used to find a numerical solution to a boundary-value problem the shooting method. As an example of the...

Exercises For Sec 43

1 Solve the following potential problems in rectangular geometry. Plot the solutions using Plot3D. a V2 lt Hx, y x, 0, y 1, y x,0 0, 1, y sin y. b V2 x, y, z 10, x, y, 0 x, y, 1 0, y, z 1, y, z x, 0, z 0, x, 1, z h x - f , where h is a Heaviside step function. Plot the solution in the z 2 plane. c VV x, y -xy, 0, y 2, y x, 0 0, x, 1 1. d VV x, y, z 1, x, y, 0 x, y, 1 0, 0, y, z 1, y, z z 1 - z , x, 0, z x, 1, z 0. Plot the solution in the z 2 plane. e V2t x, y cos n x, n an integer, jg 0, y jt...

Oscillations of a Circular Drumhead

General Solution Consider a drum consisting of a 2D membrane stretched tightly over a circular ring in the x-y plane, of radius a. The membrane is free to vibrate in the transverse z direction, with an amplitude z r, 9, t , where r and 9 are polar coordinates in the x-y plane. These vibrations satisfy the wave equation 4.4.1 . The wave propagation speed is c 'T a, where T is the tension force per unit length applied to the edge of the membrane, and a is the mass per unit area of the membrane....

ln

See Sec. 2.4.5 for a discussion of finite-difference derivatives. Substituting these expressions into Eq. 6.2.1 , we collect all terms on the right-hand side except for the term involving T 1 Tn 1 T AtS j t - 2T J1 J . 6.2.5 Equation 6.2.5 is a recursion relation that bears a distinct resemblance to Euler's method. If, at the nth time step, we know Tj for all values of j on the spatial grid, then we can use Eq. 6.2.5 to determine T at the n 1st time step at each spatial gridpoint. The...

Direction Fields for SecondOrder ODEs PhaseSpace Portraits

Phase-Space We have seen that the direction field provides a global picture of all solutions to a first-order ODE. The direction field is also a useful visualization tool for higher-order ODEs, although the field becomes difficult to view in three or more dimensions. A nontrivial case that can be easily visualized is the direction field for second-order ODEs of the form Equation 1.2.8 is a special case of Eq. 1.2.1 for which the function f is time-independent and the ODE is second-order....

Exercises For Sec 62

1 Consider the following heat equation problem on 0 lt x lt 1 T1 x x T t 2 x, T 0, t T 1, t 0, T x ,0 0, where x x 1 for 0 lt x lt 2 and x x 2 for 2 lt x lt 1. a Using the FTCS method, and taking M 10 i.e., 11 grid points including the end points , what is the largest time step size one can use b Solve the equation with the largest possible time step size. Make an animation showing only every fifth timestep for 0 lt t lt 2. 2 Using the Lax method with the largest possible time step size, solve...

The Schrodinger Equation for a Free Particle Moving in One Dimension

Let's now apply the Fourier transform analysis to another wave equation the Schrodinger equation for the evolution of the wave function x, t of a free particle of mass m moving in one dimension, d h2 d2 ih t ,t 2m Hx,t 5.1.15 This ODE is first-order in time, and so is supplemented by a single initial condition on the wave function at t 0 Application of the spatial Fourier transformation operator F f-w dxe-' kx to both sides of Eq. 5.1.15 yields the following ODE ihlTt k, t h22m2 k, t , 5.1.17...

Info Tvg

Fig. 8.6 Mean position and mean squared change in position for a random walk with a bias. We will use the rejection method to create a random variable s with distribution w s , and test these predictions for the resulting random walk, starting all particles at x 0. The resulting simulation for M 200 particles is displayed in Cell 8.18. Particles settle toward lower x, and spread as expected. The mean position of the distribution and the mean squared change in position are shown in Fig. 8.6,...

Info Ekz

Fig. 1.14 Solution to Exercise 8 b Field lines for the magnetic field B0, projected into the x, y plane. Fig. 1.14 Solution to Exercise 8 b Field lines for the magnetic field B0, projected into the x, y plane. a Solve these coupled ODEs for r z and 9 z using NDSolve, and plot the resulting field line in x, y, z via ParametricPlot3Dfor 0 lt z lt 20 and for initial conditions 90 v 2, and r0 -5 2n, n 0,1,2,3,4. Hint Along the field line, x z r z cos 9 z , y z r z sin 9 z . b Although the result...

Exercises For Sec 21

1 Prove that for a periodic function t of period T, the following is true 2 a Do the following periodic functions meet the conditions of Theorem 2.1 i t t 3 on - lt t lt t t 1 . ii x 3 x on 0 lt x lt 2 x x 2 . iii t exp -1 on 0 lt t lt 3 t t 3 . b Find the Fourier series coefficients An and Bn for the periodic functions of part a . c Plot the resulting series for different numbers of coefficients M, 1 lt M lt 10, and observe the convergence. Compare with the exact functions. Are the series...

Triangle Wave

Equations 2.1.3 , 2.1.9 , and 2.1.10 provide us with everything we need to determine a Fourier series for a given periodic function f t . Let's use these equations to construct Fourier series representations for some example functions. Our first example will be a triangle wave of period T. This function can be created from the following Mathematica commands, and is shown in Cell 2.5 for the case of T 1 f t_ 2t T 0 F t lt T 2 f t_ 2 - 2t T T 2 F t lt T T 1 Plot f t , t, 0, T f t_ 2t T 0 F t lt T...

Info Dpe

dt, dx, dv dt 1, dx, dVV dt 1, v, f x, v . 1.2.10 Fig. 1.4 A solution curve to Eq. 1.2.8 , a tangent vector, and the projection onto the x, v plane. Note that this tangent vector is independent of time. The direction field is the same in every time slice, so the trajectory of the particle can be understood by projecting solutions onto the x, v plane as shown in Fig. 1.4. The x, v plane is often referred to as phase-space, and the plot of a solution curve in the x, v plane is called a...

NUMERICAL SOLUTION OF INITIALVALUE PROBLEMS 141 NDSolve

Mathematica can solve ODE initial-value problems numerically via the intrinsic function NDSolve. The syntax for NDSolve is almost identical to that for DSolve NDSolve O E, initial conditions , x t , t,tmin,tmax 24 ordinary differential equations in the physical sciences Three things must be remembered when using NDSolve. 1 Initial conditions must always be specified. 2 No nonnumerical constants can appear in the list of ODEs or the initial conditions. 3 A finite interval of time must be...