Engineering Computation in
|
|
- Susan Lyons
- 6 years ago
- Views:
Transcription
1 Engineering Computation in Dr. Kyle Horne Department of Mechanical Engineering Spring, 2018
2 What is It? 140 Explicit Implicit Temperature T [C] Position y [px] Position y [px] Position x [px] Position x [px] Fit Data Radial Position r [um] Position y [µm] 240 Probe Laser Position x [µm] 180 r =44.80 [µm] r =32.30 [µm] r =18.80 [µm] 170 Engineering Computation in Python; Dr. Kyle Horne 2 / 44
3 Where to Learn More? Python Language Numpy (Array Support) Scipy (Numerical Methods) Sympy (Symbolic Math) Matplotlib (Plotting) Engineering Computation in Python; Dr. Kyle Horne 3 / 44
4 Basic Usage Procedural Execution, Comments and Text Formatting g = 9.81 h = # h = 0.5*g*t**2 -> t = sqrt(2*h/g) import math t = math.sqrt(2*h/g) print('t = %f [s]'%t) Results t = Engineering Computation in Python; Dr. Kyle Horne 4 / 44
5 Basic Usage Lists and Arrays import pylab as pl A = [1.0,2.0,3.0] A.append(4.0) B = pl.array(a) C = 2*B print(a) print(b) print(c) Results [1.0, 2.0, 3.0, 4.0] [ ] [ ] Engineering Computation in Python; Dr. Kyle Horne 5 / 44
6 Flow Control If-Then-Else a = 1 if a==1: print('a=1') elif a==2: print('a=2') else: print('a!=1') Results a =1 Engineering Computation in Python; Dr. Kyle Horne 6 / 44
7 Flow Control For-Loops s = 0 for k in range(4): x = 2.0*k-1.0 s = s+x print('k = %5d; x = %10f'%(k,x)) print('s = %f'%s) Results k = 0; x = k = 1; x = k = 2; x = k = 3; x = s = Engineering Computation in Python; Dr. Kyle Horne 7 / 44
8 Flow Control Functions def f(x): y = x**2-1.0 return y g = lambda x: x**2+1.0 x = 2.0 y = f(x) print('x = %f; y = %f; g(x) = %f'%(x,y,g(x))) Results x = ; y = ; g(x) = Engineering Computation in Python; Dr. Kyle Horne 8 / 44
9 Plotting Line Plots and Boilerplate import pylab as pl N = 100 x = pl.linspace(0,1,n) f = lambda x: x**2-1 y = f(x) fig = pl.figure( tight_layout=true, figsize=(5,4)) ax = fig.add_subplot(1,1,1) ax.plot(x,y,'b-',lw=2) ax.plot(x[::10],y[::10],'rs',mew=0) ax.set_xlabel('abscissa $x$ [-]') ax.set_ylabel('ordinate $y$ [-]') pl.savefig('exampleplot.pdf') Ordinate y [-] Abscissa x [-] Engineering Computation in Python; Dr. Kyle Horne 9 / 44
10 Calculation of π (Series) Theory Leibniz s series formula: [ ] ( 1) k π = 4 2k + 1 k= ; N = 50 Term Magnitude vk Terms Sum vk Term Number k Term Count N Engineering Computation in Python; Dr. Kyle Horne 10 / 44
11 Calculation of π (Series) I Example Solution 1 import numpy 2 import pylab 3 4 N = terms = numpy.empty(n) 7 for k in range(n): 8 terms[k] = 4.0*(-1)**k/(2.0*k+1.0) 9 10 sums = numpy.empty(n) 11 for k in range(n): 12 sums[k] = terms[:k+1].sum() numbers = numpy.linspace(0,n-1,n) fig = pylab.figure(tight_layout=true,figsize=(5,4)) 17 ax = fig.add_subplot(1,1,1) 18 ax.plot(numbers,abs(terms),'-',lw=2) 19 ax.set_yscale('log') 20 ax.set_xlabel('term Number $k$') Engineering Computation in Python; Dr. Kyle Horne 11 / 44
12 Calculation of π (Series) II Example Solution 21 ax.set_ylabel('term Magnitude $v_k$') 22 ax.set_title(r' ') 23 fig.savefig('pitermsplot.pdf') fig = pylab.figure(tight_layout=true,figsize=(5,4)) 26 ax = fig.add_subplot(1,1,1) 27 ax.axhline(numpy.pi,color='k',linestyle='--',linewidth=2) 28 ax.plot(numbers,sums,'.',lw=2) 29 ax.set_yticks([2.6,3.0,numpy.pi,3.4,3.8]) 30 ax.set_yticklabels(['2.6','3.0','$\pi$','3.4','3.8']) 31 ax.set_xlabel(r'term Count $N$') 32 ax.set_ylabel(r'terms Sum $\sum v_k$') 33 ax.text(5,3.8,r'$\pi \approx %f;\,n = %d$'%(terms.sum(),n)) 34 fig.savefig('pisumsplot.pdf') Engineering Computation in Python; Dr. Kyle Horne 12 / 44
13 Calculation of π (Monte Carlo) A c = πr 2 A s = (2R) 2 A c = π A s 4 r i = xi 2 + yi 2 π 4 = lim N count i [1,N] (r i < 1) N y-coordinate ; N = x-coordinate Engineering Computation in Python; Dr. Kyle Horne 13 / 44
14 Calculation of π (Monte Carlo) I Example Solution 1 import pylab 2 import numpy 3 from numpy.random import rand 4 5 def calculatepi(n): 6 x = rand(n,2) 7 r = numpy.sqrt( (x**2).sum(1) ) 8 c = (r<1.0).sum() 9 10 pi = 4.0*c/float(N) th = numpy.linspace(0,numpy.pi/2,100) 13 xt = numpy.cos(th) 14 yt = numpy.sin(th) xp = x[:,0] 17 yp = x[:,1] fig = pylab.figure(tight_layout=true,figsize=(4,4)) 20 ax = fig.add_subplot(1,1,1,aspect=1.0) Engineering Computation in Python; Dr. Kyle Horne 14 / 44
15 Calculation of π (Monte Carlo) II Example Solution 21 ax.plot(xt,yt,'k--',lw=2) 22 ax.plot(xp[r<1],yp[r<1],'x',ms=7,mew=1) 23 ax.plot(xp[r>1],yp[r>1],'+',ms=7,mew=1) 24 ax.set_xlabel('$x$-coordinate') 25 ax.set_ylabel('$y$-coordinate') 26 ax.set_title( r'$\pi \approx %.5f; N=%d$'%(pi,N) ) 27 fig.savefig('randompi.pdf') calculatepi(500) Engineering Computation in Python; Dr. Kyle Horne 15 / 44
16 Sieve of Eratosthenes Theory Sift the Twos and sift the Threes, The Sieve of Eratosthenes! When the multiples sublime, The numbers that remain are Prime. Algorithm 1 P = {1, 2,..., N} 2 For i [2, N] 1 if P [i] is 0, then skip i 2 For j [2i, N] 1 P [j] = 0 Number of Primes [#] (n) f(n) = n/log(n) f(n)/ (n) Ratio [1] Number n [#] Engineering Computation in Python; Dr. Kyle Horne 16 /
17 Sieve of Eratosthenes I Example Solution 1 import numpy 2 import pylab 3 4 N = P = numpy.empty(n,dtype=int) 6 7 for i in range(n): 8 P[i] = i 9 for i in range(2,n): 10 if P[i]==0: 11 continue 12 for j in range(2*i,n,p[i]): 13 P[j] = s = 2 16 px = (P[P!=0])[s:] 17 py = numpy.linspace(s,px.size,px.size) 18 fy = px/numpy.log(px) fig = pylab.figure(tight_layout=true,figsize=(5,4)) Engineering Computation in Python; Dr. Kyle Horne 17 / 44
18 Sieve of Eratosthenes II Example Solution 21 ax = fig.add_subplot(1,1,1) 22 ax.set_xscale('log') 23 ax.set_yscale('log') 24 lp, = ax.plot(px,py,'.') 25 lf, = ax.plot(px,fy,'-',lw=2) 26 ax.set_xlabel('number $n$ [#]') 27 ax.set_ylabel('number of Primes $\pi$ [#]') 28 ax2 = ax.twinx() 29 lr, = ax2.plot(px,fy/py,'c2_',mew=2) 30 ax2.set_ylabel(r'ratio [1]') 31 lines = [lp,lf,lr] 32 labels = [r'$\pi(n)$',r'$f(n)=n/log(n)$',r'$f(n)/\pi(n)$'] 33 ax2.legend(lines,labels,loc='upper center') 34 fig.savefig('seiveplot.pdf') Engineering Computation in Python; Dr. Kyle Horne 18 / 44
19 Orbital Simulation Theory 1 au Engineering Computation in Python; Dr. Kyle Horne 19 / 44
20 Orbital Simulation Solver Compute the acceleration on the Earth using Newton s law of gravitation. Use this to update velocity at each time step. Use velocity to update position at each time step. x (t) = x 0 + v (t) = v 0 + t 0 t a ( x) = G M x x 3 0 v (τ) dτ a (τ) dτ x 0 = r 0 î v 0 = ĵ G M r 0 r 0 = 1 au The integrals can be converted into much simpler expressions by using Euler s explicit method: x+ x f (x + x) = f (x) + f (ξ) dξ f (x) + x f (x) x Engineering Computation in Python; Dr. Kyle Horne 20 / 44
21 Orbital Simulation Algorithm Orbit Sun Earth 1 x R 2 = (r 0 ) ( î ) 2 v R 2 = G M r ĵ 0 3 t R = 0 4 While t < t end : 1 x = x + t v 2 r = x 3 a = G M x r 3 4 v = v + t a 5 t = t + t Position y [au] Position x [au] Engineering Computation in Python; Dr. Kyle Horne 21 / 44
22 Orbital Simulation I Example Solution 1 import pylab 2 import numpy 3 4 MS = e30 5 au = e9 6 G = 6.67E N = U0 = numpy.sqrt(g*ms/au) 11 Y0 = dt = Y0/ xh = numpy.empty( (N,2) ) x = numpy.array([au,0.0]) 17 v = numpy.array([0.0,u0]) xh[0,:] = x 20 Engineering Computation in Python; Dr. Kyle Horne 22 / 44
23 Orbital Simulation II Example Solution 21 for k in range(1,n): 22 x = x+v*dt 23 r = numpy.sqrt( (x**2).sum() ) 24 a = -G*MS*x/r**3 25 v = v+a*dt xh[k] = x fig = pylab.figure(figsize=(4,4), 30 tight_layout={'rect':(0,0,1,0.85)}) 31 ax = fig.add_subplot(1,1,1,aspect=1.0) 32 ax.plot(xh[:,0]/au,xh[:,1]/au,'k--',lw=2,label='orbit') 33 ax.plot([0],[0],'o',color='orange', 34 ms=30,mew=1.5,mec='yellow',label='sun') 35 ax.plot([1],[0],'o',color='green', 36 ms=10,mew=1.5,mec='cyan',label='earth') 37 ax.set_xlim(-1.1,1.1) 38 ax.set_ylim(-1.1,1.1) 39 ax.set_xlabel('position $x$ [au]') 40 ax.set_ylabel('position $y$ [au]') Engineering Computation in Python; Dr. Kyle Horne 23 / 44
24 Orbital Simulation III Example Solution 41 ax.legend(frameon=false,ncol=3,numpoints=1,handletextpad=0.5, 42 bbox_to_anchor=(0,1.05),loc='lower left') 43 fig.savefig('orbitplot.pdf') Engineering Computation in Python; Dr. Kyle Horne 24 / 44
25 Curve Fitting Theory Find Γ, α such that R (Γ, α) is minimized V θ (r) = Γ ( r exp αr 2) [ R (Γ, α) = i Tangential Velocity V [m/s] Fit Experiment (V i V θ (r i )) 2] Position r [m] from scipy.optimize import minimize Engineering Computation in Python; Dr. Kyle Horne 25 / 44
26 Curve Fitting I Example Solver 1 import numpy 2 import pylab 3 from scipy.optimize import minimize 4 5 re,ve = numpy.loadtxt('vortex.txt',unpack=true) 6 7 def candidate(g,a): 8 g = lambda r: G/r*(1-numpy.exp(-a*r**2)) 9 return g def residual(x): 12 G,a = x 13 g = candidate(g,a) 14 R = numpy.sqrt( ( (Ve-g(re))**2 ).sum() ) 15 return R x0 = [1.0,200.0] 18 opt = minimize(residual,x0) 19 G,a = opt.x 20 print(g,a) Engineering Computation in Python; Dr. Kyle Horne 26 / 44
27 Curve Fitting II Example Solver N = rf = numpy.linspace(re.min(),re.max(),n) 24 gf = candidate(g,a) 25 Vf = gf(rf) fig = pylab.figure(tight_layout=true,figsize=(5,4)) 28 ax = fig.add_subplot(1,1,1) 29 ax.plot(rf,vf,'--',lw=2,label='fit') 30 ax.plot(re,ve,'.',label='experiment') 31 ax.set_xlabel(r'position $r$ [m]') 32 ax.set_ylabel(r'tangential Velocity $V_\theta$ [m/s]') 33 ax.legend() 34 fig.savefig('vortexplot.pdf') Engineering Computation in Python; Dr. Kyle Horne 27 / 44
28 Artillery Fire Theory x (t) = v 0 t cos (θ) x t (x) = v 0 cos (θ) y (x) = v 0 t (x) sin (θ) 1 gt (x)2 2 ( x 2 g (x) = 50) g (x h ) = y (x h ) Position y [m] Position x [m] from scipy.optimize import newton Engineering Computation in Python; Dr. Kyle Horne 28 / 44
29 Artillery Fire I Example Solver 1 import pylab 2 import numpy 3 from scipy.optimize import newton 4 5 def py(x,th,v0): 6 g = t = x/(v0*numpy.cos(th)) 8 y = t*(v0*numpy.sin(th)-0.5*g*t) 9 return y 10 def gy(x): 11 y = (x/50)**2 12 return y 13 def hit(th,v0): 14 f = lambda x: py(x,th,v0)-gy(x) 15 x = newton(f,1000.0) 16 return x def plottrajectory(th,v0): 19 N = xh = hit(th,v0) Engineering Computation in Python; Dr. Kyle Horne 29 / 44
30 Artillery Fire II Example Solver 21 yh = gy(xh) 22 xp = numpy.linspace(0,xh,n) 23 xg = numpy.linspace(-0.1*xh,1.2*xh,n) 24 p = py(xp,th,v0) 25 g = gy(xg) 26 fig = pylab.figure(tight_layout=true,figsize=(5,4)) 27 ax = fig.add_subplot(1,1,1,aspect=1.0) 28 lg = ax.fill_between(xg,g,-30,color='g') 29 lp = ax.plot(xp,p,'--',lw=2) 30 lh = ax.plot([xh],[yh],'kx',ms=10,mew=4) 31 ax.set_xlabel('position $x$ [m]') 32 ax.set_xlim(xg.min(),xg.max()) 33 ax.set_ylim(-30,1.1*p.max()) 34 ax.set_ylabel('position $y$ [m]') 35 fig.savefig('artilleryplot.pdf') th = 75.0*numpy.pi/ v0 = plottrajectory(th,v0) Engineering Computation in Python; Dr. Kyle Horne 30 / 44
31 Heated Wall Theory import sympy k d2 T dx 2 + Q = 0 k dt dx + Qx = C 0 kt + Q 2 x2 = C 0 x + C 1 Temperature T [C] Exact Numerical Position x [m] 0 x L k i T i+1 2T i + T i 1 x 2 + Q i = 0 0 ξ (i 1) i (i + 1) N + 1 Engineering Computation in Python; Dr. Kyle Horne 31 / 44
32 Heated Wall I Example Solver 1 import pylab 2 import numpy 3 import scipy.sparse as sparse 4 import scipy.sparse.linalg as linalg 5 import sympy 6 7 Q = # W 8 k = 50.0 # W/m.K 9 L = 1.0 # m T0 = 25.0 # K 12 TL = 25.0 # K def plotsolution(xe,te,xn,tn): 15 fig = pylab.figure(tight_layout=true,figsize=(5,4)) 16 ax = fig.add_subplot(1,1,1) 17 eline = ax.plot(xe,te,'-',lw=2,label='exact') 18 nline = ax.plot(xn,tn,'v',lw=2,label='numerical') 19 ax.legend(loc='best') 20 ax.set_xlabel('position $x$ [m]') Engineering Computation in Python; Dr. Kyle Horne 32 / 44
33 Heated Wall II Example Solver 21 ax.set_ylabel('temperature $T$ [C]') 22 fig.savefig('wallplot.pdf') def finitedifferences(n): 25 dx = L/(N+1) DP = -2.0*numpy.ones(N) 28 DL = numpy.ones(n-1) 29 DU = numpy.ones(n-1) 30 A = sparse.diags([dl,dp,du],(-1,0,1)) 31 A = A.tocsc() S = (-Q*dx**2/k)*numpy.ones(N) 34 S[0] = S[0]-T0 35 S[N-1] = S[N-1]-TL T = linalg.spsolve(a,s) x = numpy.linspace(0,l,n+2) 40 T = numpy.insert(t,0,t0) Engineering Computation in Python; Dr. Kyle Horne 33 / 44
34 Heated Wall III Example Solver 41 T = numpy.append(t,tl) return x,t def differentialequation(n): 46 x = sympy.symbols('x') 47 T = sympy.symbols('t',cls=sympy.function) 48 deq = sympy.eq( k*t(x).diff(x,x)+q, 0 ) 49 sol = sympy.dsolve(deq,t(x)) 50 C1,C2 = sympy.symbols('c1 C2') system = [] 53 system.append( sol.subs(x,0).subs(t(0),t0) ) 54 system.append( sol.subs(x,l).subs(t(l),tl) ) 55 coeffs = sympy.solve(system,[c1,c2]) 56 Ts = sympy.solve( sol.subs(coeffs), T(x) )[0] 57 Tf = sympy.lambdify(x,ts,'numpy') x = numpy.linspace(0,l,n+2) 60 T = Tf(x) Engineering Computation in Python; Dr. Kyle Horne 34 / 44
35 Heated Wall IV Example Solver return x,t xn,tn = finitedifferences(6) 65 xe,te = differentialequation(100) 66 plotsolution(xe,te,xn,tn) Engineering Computation in Python; Dr. Kyle Horne 35 / 44
36 Duct Flow Theory from scipy.integrate import ode w t = 1 ρ ( ) P z + ν 2 w x + 2 w 2 y Max Velocity w [m/s] Position y [cm] Velocity w [m/s] Time t [ms] Position x [cm] 0.0 Engineering Computation in Python; Dr. Kyle Horne 36 / 44
37 Duct Flow I Example Solver 1 import pylab 2 import numpy 3 from scipy.integrate import ode 4 5 #=============# 6 #= Constants =# 7 #=============# 8 9 dpdz = -10.0e3 10 mu = rho = nu = mu/rho 13 L = 10.0e-2 14 D = L/ Dc = 4*(L**2-numpy.pi*D**2/4)/(4*L) 17 Vc = numpy.sqrt(2*abs(dpdz)*dc/rho) 18 gre = rho*vc*dc/mu N = 75 Engineering Computation in Python; Dr. Kyle Horne 37 / 44
38 Duct Flow II Example Solver 21 x = numpy.linspace(-l/2,l/2,n) 22 y = numpy.linspace(-l/2,l/2,n) 23 dx = L/(N-1) 24 dy = L/(N-1) X,Y = numpy.meshgrid(x,y) 27 R = numpy.sqrt(x**2+y**2) mask = numpy.logical_and(y<l/15,y>-l/15) 30 mask = numpy.logical_and(x>0.0,mask) 31 mask = numpy.logical_or(r<d/2.0,mask) #==============# 34 #= Derivative =# 35 #==============# def dwdt(t,w): 38 wl = w.reshape( (N,N) ) 39 o = numpy.zeros( (N,N) ) 40 Engineering Computation in Python; Dr. Kyle Horne 38 / 44
39 Duct Flow III Example Solver 41 o[1:-1,1:-1] = -dpdz/rho+nu*( 42 (wl[2:,1:-1]-2*wl[1:-1,1:-1]+wl[:-2,1:-1])/dx** (wl[1:-1,2:]-2*wl[1:-1,1:-1]+wl[1:-1,:-2])/dy**2 44 ) o[mask] = return o.reshape(-1) #==================# 50 #= Initialization =# 51 #==================# w0 = numpy.zeros( (N,N) ).reshape(-1) 54 t = numpy.linspace(0.0,0.007,100) 55 wm = numpy.zeros(t.size) 56 wm[0] = w0.max() I = ode( dwdt ) 59 I.set_initial_value(w0,0.0) 60 Engineering Computation in Python; Dr. Kyle Horne 39 / 44
40 Duct Flow IV Example Solver 61 #============# 62 #= Solution =# 63 #============# for k in range(1,t.size): 66 I.integrate(t[k]) 67 wm[k] = I.y.max() 68 print('%10d %20.5e %20.5e'%(k,t[k],wm[k])) #============# 71 #= Plotting =# 72 #============# w = I.y.reshape( (N,N) ) fig = pylab.figure(tight_layout=true,figsize=(5,4)) 77 ax = fig.add_subplot(1,1,1) 78 ax.plot(1e3*t,wm,'-',lw=2) 79 ax.set_ylim(0,1.1*wm.max()) 80 ax.set_xlabel('time $t$ [ms]') Engineering Computation in Python; Dr. Kyle Horne 40 / 44
41 Duct Flow V Example Solver 81 ax.set_ylabel('max Velocity $w$ [m/s]') 82 fig.savefig('velocitymaxplot.pdf') fig = pylab.figure(tight_layout=true,figsize=(5,4)) 85 ax = fig.add_subplot(1,1,1,aspect=1.0) 86 cf = ax.contourf(1e2*x,1e2*y,w,20,cmap=pylab.get_cmap('viridis')) 87 cl = ax.contour(1e2*x,1e2*y,w,20,cmap=pylab.get_cmap('viridis')) 88 ax.set_xlabel('position $x$ [cm]') 89 ax.set_ylabel('position $y$ [cm]') 90 fig.colorbar(cf,ax=ax,label='velocity $w$ [m/s]') 91 fig.savefig('velocityprofileplot.pdf') V = w.max() 94 Re = rho*v*dc/mu print('') 97 print(gre) 98 print( Re) Engineering Computation in Python; Dr. Kyle Horne 41 / 44
42 Group Work Theory from glog import glob Doubled Fall Height, 2 h [m] z = 1 2 g 0t 2 + ż 0 t + z 0 2h = g 0 t 2 f Data 1 Data 2 Data 3 Data 4 g 0 = 9.27 m/s Fall Time Squared, t 2 f [s 2 ] Data # Height [m], Time [s] Engineering Computation in Python; Dr. Kyle Horne 42 / 44
43 Group Work I Example Solver 1 import pylab as pl 2 import numpy as np 3 from glob import glob 4 5 def getdata(): 6 fns = sorted(glob('*.txt')) 7 D = [] 8 for fn in fns: 9 D.append( np.loadtxt(fn) ) 10 return np.array(d) def doplot(d,c): 13 fig = pl.figure(figsize=(5,4),tight_layout=true) 14 ax = fig.add_subplot(1,1,1) ms = 'os^v' 17 for k in range(d.shape[0]): 18 h = D[k,:,0] 19 t = D[k,:,1] 20 ax.plot(t**2,h,ms[k],label='data %d'%(k+1)) Engineering Computation in Python; Dr. Kyle Horne 43 / 44
44 Group Work II Example Solver x = np.linspace((d[:,:,1]**2).min(),(d[:,:,1]**2).max()) 23 y = np.polyval(c,x)/ ax.plot(x,y,'k--',label='$g_0=%.2f$ $m/s^2$'%c[0],zorder=1) ax.set_xlabel('fall Time Squared, $t_f^2$ [$s^2$] ') 27 ax.set_ylabel('doubled Fall Height, $2 \cdot h$ [$m$]') 28 ax.legend() fig.savefig('group.pdf') def dofit(d): 33 x = D[:,:,1].flatten()**2 34 y = 2.0*D[:,:,0].flatten() 35 C = np.polyfit(x,y,1) 36 return C D = getdata() 39 C = dofit(d) 40 doplot(d,c) Engineering Computation in Python; Dr. Kyle Horne 44 / 44
Exercise_set7_programming_exercises
Exercise_set7_programming_exercises May 13, 2018 1 Part 1(d) We start by defining some function that will be useful: The functions defining the system, and the Hamiltonian and angular momentum. In [1]:
More informationOrdinary Differential Equations
Ordinary Differential Equations 1 An Oscillating Pendulum applying the forward Euler method 2 Celestial Mechanics simulating the n-body problem 3 The Tractrix Problem setting up the differential equations
More informationA Glimpse at Scipy FOSSEE. June Abstract This document shows a glimpse of the features of Scipy that will be explored during this course.
A Glimpse at Scipy FOSSEE June 010 Abstract This document shows a glimpse of the features of Scipy that will be explored during this course. 1 Introduction SciPy is open-source software for mathematics,
More informationNumerical Linear Algebra
Numerical Analysis, Lund University, 2018 96 Numerical Linear Algebra Unit 8: Condition of a Problem Numerical Analysis, Lund University Claus Führer and Philipp Birken Numerical Analysis, Lund University,
More informationChain Rule. MATH 311, Calculus III. J. Robert Buchanan. Spring Department of Mathematics
3.33pt Chain Rule MATH 311, Calculus III J. Robert Buchanan Department of Mathematics Spring 2019 Single Variable Chain Rule Suppose y = g(x) and z = f (y) then dz dx = d (f (g(x))) dx = f (g(x))g (x)
More informationThe Shooting Method for Boundary Value Problems
1 The Shooting Method for Boundary Value Problems Consider a boundary value problem of the form y = f(x, y, y ), a x b, y(a) = α, y(b) = β. (1.1) One natural way to approach this problem is to study the
More informationKinematics (special case) Dynamics gravity, tension, elastic, normal, friction. Energy: kinetic, potential gravity, spring + work (friction)
Kinematics (special case) a = constant 1D motion 2D projectile Uniform circular Dynamics gravity, tension, elastic, normal, friction Motion with a = constant Newton s Laws F = m a F 12 = F 21 Time & Position
More informationMath 3313: Differential Equations Second-order ordinary differential equations
Math 3313: Differential Equations Second-order ordinary differential equations Thomas W. Carr Department of Mathematics Southern Methodist University Dallas, TX Outline Mass-spring & Newton s 2nd law Properties
More information2 Getting Started with Numerical Computations in Python
1 Documentation and Resources * Download: o Requirements: Python, IPython, Numpy, Scipy, Matplotlib o Windows: google "windows download (Python,IPython,Numpy,Scipy,Matplotlib" o Debian based: sudo apt-get
More informationOptimal Control. Quadratic Functions. Single variable quadratic function: Multi-variable quadratic function:
Optimal Control Control design based on pole-placement has non unique solutions Best locations for eigenvalues are sometimes difficult to determine Linear Quadratic LQ) Optimal control minimizes a quadratic
More informationOrdinary Differential Equation Theory
Part I Ordinary Differential Equation Theory 1 Introductory Theory An n th order ODE for y = y(t) has the form Usually it can be written F (t, y, y,.., y (n) ) = y (n) = f(t, y, y,.., y (n 1) ) (Implicit
More informationMath Review Night: Work and the Dot Product
Math Review Night: Work and the Dot Product Dot Product A scalar quantity Magnitude: A B = A B cosθ The dot product can be positive, zero, or negative Two types of projections: the dot product is the parallel
More informationFirst-Order Differential Equations
CHAPTER 1 First-Order Differential Equations 1. Diff Eqns and Math Models Know what it means for a function to be a solution to a differential equation. In order to figure out if y = y(x) is a solution
More informationMath 131 Final Exam Spring 2016
Math 3 Final Exam Spring 06 Name: ID: multiple choice questions worth 5 points each. Exam is only out of 00 (so there is the possibility of getting more than 00%) Exam covers sections. through 5.4 No graphing
More informationMath 225 Differential Equations Notes Chapter 1
Math 225 Differential Equations Notes Chapter 1 Michael Muscedere September 9, 2004 1 Introduction 1.1 Background In science and engineering models are used to describe physical phenomena. Often these
More information2.2 The derivative as a Function
2.2 The derivative as a Function Recall: The derivative of a function f at a fixed number a: f a f a+h f(a) = lim h 0 h Definition (Derivative of f) For any number x, the derivative of f is f x f x+h f(x)
More informationModule 12: Work and the Scalar Product
Module 1: Work and the Scalar Product 1.1 Scalar Product (Dot Product) We shall introduce a vector operation, called the dot product or scalar product that takes any two vectors and generates a scalar
More informationEx. 1. Find the general solution for each of the following differential equations:
MATH 261.007 Instr. K. Ciesielski Spring 2010 NAME (print): SAMPLE TEST # 2 Solve the following exercises. Show your work. (No credit will be given for an answer with no supporting work shown.) Ex. 1.
More informationNUMERICAL ANALYSIS WEEKLY OVERVIEW
NUMERICAL ANALYSIS WEEKLY OVERVIEW M. AUTH 1. Monday 28 August Students are encouraged to download Anaconda Python. Anaconda is a version of Python that comes with some numerical packages (numpy and matplotlib)
More information10.34: Numerical Methods Applied to Chemical Engineering. Lecture 19: Differential Algebraic Equations
10.34: Numerical Methods Applied to Chemical Engineering Lecture 19: Differential Algebraic Equations 1 Recap Differential algebraic equations Semi-explicit Fully implicit Simulation via backward difference
More informationMATH20411 PDEs and Vector Calculus B
MATH2411 PDEs and Vector Calculus B Dr Stefan Güttel Acknowledgement The lecture notes and other course materials are based on notes provided by Dr Catherine Powell. SECTION 1: Introctory Material MATH2411
More informationMath and Numerical Methods Review
Math and Numerical Methods Review Michael Caracotsios, Ph.D. Clinical Associate Professor Chemical Engineering Department University of Illinois at Chicago Introduction In the study of chemical engineering
More informationFind the indicated derivative. 1) Find y(4) if y = 3 sin x. A) y(4) = 3 cos x B) y(4) = 3 sin x C) y(4) = - 3 cos x D) y(4) = - 3 sin x
Assignment 5 Name Find the indicated derivative. ) Find y(4) if y = sin x. ) A) y(4) = cos x B) y(4) = sin x y(4) = - cos x y(4) = - sin x ) y = (csc x + cot x)(csc x - cot x) ) A) y = 0 B) y = y = - csc
More informationAP Calculus Chapter 3 Testbank (Mr. Surowski)
AP Calculus Chapter 3 Testbank (Mr. Surowski) Part I. Multiple-Choice Questions (5 points each; please circle the correct answer.). If f(x) = 0x 4 3 + x, then f (8) = (A) (B) 4 3 (C) 83 3 (D) 2 3 (E) 2
More informationSpring 2015 Sample Final Exam
Math 1151 Spring 2015 Sample Final Exam Final Exam on 4/30/14 Name (Print): Time Limit on Final: 105 Minutes Go on carmen.osu.edu to see where your final exam will be. NOTE: This exam is much longer than
More informationAP Calculus 2004 AB FRQ Solutions
AP Calculus 4 AB FRQ Solutions Louis A. Talman, Ph. D. Emeritus Professor of Mathematics Metropolitan State University of Denver July, 7 Problem. Part a The function F (t) = 8 + 4 sin(t/) gives the rate,
More informationLinear Classification
Linear Classification by Prof. Seungchul Lee isystems Design Lab http://isystems.unist.ac.kr/ UNIS able of Contents I.. Supervised Learning II.. Classification III. 3. Perceptron I. 3.. Linear Classifier
More informationNORTHEASTERN UNIVERSITY Department of Mathematics
NORTHEASTERN UNIVERSITY Department of Mathematics MATH 1342 (Calculus 2 for Engineering and Science) Final Exam Spring 2010 Do not write in these boxes: pg1 pg2 pg3 pg4 pg5 pg6 pg7 pg8 Total (100 points)
More informationUniform and constant electromagnetic fields
Fundamentals of Plasma Physics, Nuclear Fusion and Lasers Single Particle Motion Uniform and constant electromagnetic fields Nuno R. Pinhão 2015, March In this notebook we analyse the movement of individual
More informationOrdinary Differential Equations (ODEs)
c01.tex 8/10/2010 22: 55 Page 1 PART A Ordinary Differential Equations (ODEs) Chap. 1 First-Order ODEs Sec. 1.1 Basic Concepts. Modeling To get a good start into this chapter and this section, quickly
More informationPractice Problems For Test 3
Practice Problems For Test 3 Power Series Preliminary Material. Find the interval of convergence of the following. Be sure to determine the convergence at the endpoints. (a) ( ) k (x ) k (x 3) k= k (b)
More informationMATH 2433 Homework 1
MATH 433 Homework 1 1. The sequence (a i ) is defined recursively by a 1 = 4 a i+1 = 3a i find a closed formula for a i in terms of i.. In class we showed that the Fibonacci sequence (a i ) defined by
More information4r 2 12r + 9 = 0. r = 24 ± y = e 3x. y = xe 3x. r 2 6r + 25 = 0. y(0) = c 1 = 3 y (0) = 3c 1 + 4c 2 = c 2 = 1
Mathematics MATB44, Assignment 2 Solutions to Selected Problems Question. Solve 4y 2y + 9y = 0 Soln: The characteristic equation is The solutions are (repeated root) So the solutions are and Question 2
More informationProblem Set. Assignment #1. Math 3350, Spring Feb. 6, 2004 ANSWERS
Problem Set Assignment #1 Math 3350, Spring 2004 Feb. 6, 2004 ANSWERS i Problem 1. [Section 1.4, Problem 4] A rocket is shot straight up. During the initial stages of flight is has acceleration 7t m /s
More informationPDE: The Method of Characteristics Page 1
PDE: The Method of Characteristics Page y u x (x, y) + x u y (x, y) =, () u(, y) = cos y 2. Solution The partial differential equation given can be rewritten as follows: u(x, y) y, x =, (2) where = / x,
More informationIntroduction to Differentials
Introduction to Differentials David G Radcliffe 13 March 2007 1 Increments Let y be a function of x, say y = f(x). The symbol x denotes a change or increment in the value of x. Note that a change in the
More informationRandom sample problems
UNIVERSITY OF ALABAMA Department of Physics and Astronomy PH 125 / LeClair Spring 2009 Random sample problems 1. The position of a particle in meters can be described by x = 10t 2.5t 2, where t is in seconds.
More informationODE Homework Solutions of Linear Homogeneous Equations; the Wronskian
ODE Homework 3 3.. Solutions of Linear Homogeneous Equations; the Wronskian 1. Verify that the functions y 1 (t = e t and y (t = te t are solutions of the differential equation y y + y = 0 Do they constitute
More informationFourier transforms. c n e inπx. f (x) = Write same thing in an equivalent form, using n = 1, f (x) = l π
Fourier transforms We can imagine our periodic function having periodicity taken to the limits ± In this case, the function f (x) is not necessarily periodic, but we can still use Fourier transforms (related
More informationAlgorithms for Uncertainty Quantification
Technische Universität München SS 2017 Lehrstuhl für Informatik V Dr. Tobias Neckel M. Sc. Ionuț Farcaș April 26, 2017 Algorithms for Uncertainty Quantification Tutorial 1: Python overview In this worksheet,
More informationOrdinary Differential Equations
Ordinary Differential Equations 1 An Oscillating Pendulum applying the forward Euler method 2 Celestial Mechanics simulating the n-body problem 3 The Tractrix Problem setting up the differential equations
More informationLorenz Equations. Lab 1. The Lorenz System
Lab 1 Lorenz Equations Chaos: When the present determines the future, but the approximate present does not approximately determine the future. Edward Lorenz Lab Objective: Investigate the behavior of a
More informationSolutions to Homework 11
Solutions to Homework 11 Read the statement of Proposition 5.4 of Chapter 3, Section 5. Write a summary of the proof. Comment on the following details: Does the proof work if g is piecewise C 1? Or did
More information1/30. Rigid Body Rotations. Dave Frank
. 1/3 Rigid Body Rotations Dave Frank A Point Particle and Fundamental Quantities z 2/3 m v ω r y x Angular Velocity v = dr dt = ω r Kinetic Energy K = 1 2 mv2 Momentum p = mv Rigid Bodies We treat a rigid
More informationJUST THE MATHS UNIT NUMBER ORDINARY DIFFERENTIAL EQUATIONS 1 (First order equations (A)) A.J.Hobson
JUST THE MATHS UNIT NUMBER 5. ORDINARY DIFFERENTIAL EQUATIONS (First order equations (A)) by A.J.Hobson 5.. Introduction and definitions 5..2 Exact equations 5..3 The method of separation of the variables
More informationLogistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations
Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations S. Y. Ha and J. Park Department of Mathematical Sciences Seoul National University Sep 23, 2013 Contents 1 Logistic Map 2 Euler and
More informationMaxima and Minima. (a, b) of R if
Maxima and Minima Definition Let R be any region on the xy-plane, a function f (x, y) attains its absolute or global, maximum value M on R at the point (a, b) of R if (i) f (x, y) M for all points (x,
More informationLAURENTIAN UNIVERSITY UNIVERSITÉ LAURENTIENNE
Page 1 of 15 LAURENTIAN UNIVERSITY UNIVERSITÉ LAURENTIENNE Wednesday, December 13 th Course and No. 2006 MATH 2066 EL Date................................... Cours et no........................... Total
More informationPractice Problems For Test 3
Practice Problems For Test 3 Power Series Preliminary Material. Find the interval of convergence of the following. Be sure to determine the convergence at the endpoints. (a) ( ) k (x ) k (x 3) k= k (b)
More informationPython Analysis. PHYS 224 September 25/26, 2014
Python Analysis PHYS 224 September 25/26, 2014 Goals Two things to teach in this lecture 1. How to use python to fit data 2. How to interpret what python gives you Some references: http://nbviewer.ipython.org/url/media.usm.maine.edu/~pauln/
More informationMATH 1231 MATHEMATICS 1B Calculus Section 3A: - First order ODEs.
MATH 1231 MATHEMATICS 1B 2010. For use in Dr Chris Tisdell s lectures. Calculus Section 3A: - First order ODEs. Created and compiled by Chris Tisdell S1: What is an ODE? S2: Motivation S3: Types and orders
More informationProblem Set 1 solutions
University of Alabama Department of Physics and Astronomy PH 301 / LeClair Fall 2018 Problem Set 1 solutions 1. If a(t), b(t), and c(t) are functions of t, verify the following results: ( d [a (b c)] =
More informationAPPLIED MATHEMATICS. Part 1: Ordinary Differential Equations. Wu-ting Tsai
APPLIED MATHEMATICS Part 1: Ordinary Differential Equations Contents 1 First Order Differential Equations 3 1.1 Basic Concepts and Ideas................... 4 1.2 Separable Differential Equations................
More informationCIRCLES PART - II Theorem: The condition that the straight line lx + my + n = 0 may touch the circle x 2 + y 2 = a 2 is
CIRCLES PART - II Theorem: The equation of the tangent to the circle S = 0 at P(x 1, y 1 ) is S 1 = 0. Theorem: The equation of the normal to the circle S x + y + gx + fy + c = 0 at P(x 1, y 1 ) is (y
More informationLecture 10. (2) Functions of two variables. Partial derivatives. Dan Nichols February 27, 2018
Lecture 10 Partial derivatives Dan Nichols nichols@math.umass.edu MATH 233, Spring 2018 University of Massachusetts February 27, 2018 Last time: functions of two variables f(x, y) x and y are the independent
More informationArc Length and Surface Area in Parametric Equations
Arc Length and Surface Area in Parametric Equations MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2011 Background We have developed definite integral formulas for arc length
More informationCoordinate systems and vectors in three spatial dimensions
PHYS2796 Introduction to Modern Physics (Spring 2015) Notes on Mathematics Prerequisites Jim Napolitano, Department of Physics, Temple University January 7, 2015 This is a brief summary of material on
More informationPython Analysis. PHYS 224 October 1/2, 2015
Python Analysis PHYS 224 October 1/2, 2015 Goals Two things to teach in this lecture 1. How to use python to fit data 2. How to interpret what python gives you Some references: http://nbviewer.ipython.org/url/media.usm.maine.edu/~pauln/
More informationand in each case give the range of values of x for which the expansion is valid.
α β γ δ ε ζ η θ ι κ λ µ ν ξ ο π ρ σ τ υ ϕ χ ψ ω Mathematics is indeed dangerous in that it absorbs students to such a degree that it dulls their senses to everything else P Kraft Further Maths A (MFPD)
More informationMATH 280 Multivariate Calculus Fall Integrating a vector field over a curve
MATH 280 Multivariate alculus Fall 2012 Definition Integrating a vector field over a curve We are given a vector field F and an oriented curve in the domain of F as shown in the figure on the left below.
More informationConjugate-Gradient. Learn about the Conjugate-Gradient Algorithm and its Uses. Descent Algorithms and the Conjugate-Gradient Method. Qx = b.
Lab 1 Conjugate-Gradient Lab Objective: Learn about the Conjugate-Gradient Algorithm and its Uses Descent Algorithms and the Conjugate-Gradient Method There are many possibilities for solving a linear
More informationMS 3011 Exercises. December 11, 2013
MS 3011 Exercises December 11, 2013 The exercises are divided into (A) easy (B) medium and (C) hard. If you are particularly interested I also have some projects at the end which will deepen your understanding
More informationDIFFERENTIATION RULES
3 DIFFERENTIATION RULES DIFFERENTIATION RULES 3. The Product and Quotient Rules In this section, we will learn about: Formulas that enable us to differentiate new functions formed from old functions by
More informationWrite a simple 1D DFT code in Python
Write a simple 1D DFT code in Python Ask Hjorth Larsen, asklarsen@gmail.com Keenan Lyon, lyon.keenan@gmail.com September 15, 2018 Overview Our goal is to write our own KohnSham (KS) density functional
More informationINSTRUCTIONS. UNIVERSITY OF MANITOBA Term Test 2C COURSE: MATH 1500 DATE & TIME: November 1, 2018, 5:40PM 6:40PM CRN: various
INSTRUCTIONS I. No texts, notes, or other aids are permitted. There are no calculators, cellphones or electronic translators permitted. II. This exam has a title page, 5 pages of questions and two blank
More informationMath Review 1: Vectors
Math Review 1: Vectors Coordinate System Coordinate system: used to describe the position of a point in space and consists of 1. An origin as the reference point 2. A set of coordinate axes with scales
More informationJUST THE MATHS UNIT NUMBER INTEGRATION APPLICATIONS 10 (Second moments of an arc) A.J.Hobson
JUST THE MATHS UNIT NUMBER 13.1 INTEGRATION APPLICATIONS 1 (Second moments of an arc) by A.J.Hobson 13.1.1 Introduction 13.1. The second moment of an arc about the y-axis 13.1.3 The second moment of an
More informationMATH The Derivative as a Function - Section 3.2. The derivative of f is the function. f x h f x. f x lim
MATH 90 - The Derivative as a Function - Section 3.2 The derivative of f is the function f x lim h 0 f x h f x h for all x for which the limit exists. The notation f x is read "f prime of x". Note that
More informationENGIN 211, Engineering Math. Laplace Transforms
ENGIN 211, Engineering Math Laplace Transforms 1 Why Laplace Transform? Laplace transform converts a function in the time domain to its frequency domain. It is a powerful, systematic method in solving
More informationECE 5615/4615 Computer Project
Set #1p Due Friday March 17, 017 ECE 5615/4615 Computer Project The details of this first computer project are described below. This being a form of take-home exam means that each person is to do his/her
More informationNumerical Methods for Initial Value Problems; Harmonic Oscillators
1 Numerical Methods for Initial Value Problems; Harmonic Oscillators Lab Objective: Implement several basic numerical methods for initial value problems (IVPs), and use them to study harmonic oscillators.
More informationGradient Descent Methods
Lab 18 Gradient Descent Methods Lab Objective: Many optimization methods fall under the umbrella of descent algorithms. The idea is to choose an initial guess, identify a direction from this point along
More informationMath 2a Prac Lectures on Differential Equations
Math 2a Prac Lectures on Differential Equations Prof. Dinakar Ramakrishnan 272 Sloan, 253-37 Caltech Office Hours: Fridays 4 5 PM Based on notes taken in class by Stephanie Laga, with a few added comments
More informationMathematical Methods - Lecture 7
Mathematical Methods - Lecture 7 Yuliya Tarabalka Inria Sophia-Antipolis Méditerranée, Titane team, http://www-sop.inria.fr/members/yuliya.tarabalka/ Tel.: +33 (0)4 92 38 77 09 email: yuliya.tarabalka@inria.fr
More information7.1. Calculus of inverse functions. Text Section 7.1 Exercise:
Contents 7. Inverse functions 1 7.1. Calculus of inverse functions 2 7.2. Derivatives of exponential function 4 7.3. Logarithmic function 6 7.4. Derivatives of logarithmic functions 7 7.5. Exponential
More informationI. Numerical Computing
I. Numerical Computing A. Lectures 1-3: Foundations of Numerical Computing Lecture 1 Intro to numerical computing Understand difference and pros/cons of analytical versus numerical solutions Lecture 2
More information3 2 6 Solve the initial value problem u ( t) 3. a- If A has eigenvalues λ =, λ = 1 and corresponding eigenvectors 1
Math Problem a- If A has eigenvalues λ =, λ = 1 and corresponding eigenvectors 1 3 6 Solve the initial value problem u ( t) = Au( t) with u (0) =. 3 1 u 1 =, u 1 3 = b- True or false and why 1. if A is
More informationTest 2 Solutions - Python Edition
'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ EGR 103L Fall 2017 Test 2 Solutions - Python Edition Michael R. Gustafson II Name (please print) NET ID (please print): In keeping with the Community Standard,
More informationLaplace Transforms Chapter 3
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first. Laplace transforms play a key role in important
More informationPractice Final Exam Solutions
Important Notice: To prepare for the final exam, study past exams and practice exams, and homeworks, quizzes, and worksheets, not just this practice final. A topic not being on the practice final does
More informationNote: Final Exam is at 10:45 on Tuesday, 5/3/11 (This is the Final Exam time reserved for our labs). From Practice Test I
MA Practice Final Answers in Red 4/8/ and 4/9/ Name Note: Final Exam is at :45 on Tuesday, 5// (This is the Final Exam time reserved for our labs). From Practice Test I Consider the integral 5 x dx. Sketch
More informationIntroduction to multiscale modeling and simulation. Explicit methods for ODEs : forward Euler. y n+1 = y n + tf(y n ) dy dt = f(y), y(0) = y 0
Introduction to multiscale modeling and simulation Lecture 5 Numerical methods for ODEs, SDEs and PDEs The need for multiscale methods Two generic frameworks for multiscale computation Explicit methods
More informationMath 234. What you should know on day one. August 28, You should be able to use general principles like. x = cos t, y = sin t, 0 t π.
Math 234 What you should know on day one August 28, 2001 1 You should be able to use general principles like Length = ds, Area = da, Volume = dv For example the length of the semi circle x = cos t, y =
More informationExtra Problems and Examples
Extra Problems and Examples Steven Bellenot October 11, 2007 1 Separation of Variables Find the solution u(x, y) to the following equations by separating variables. 1. u x + u y = 0 2. u x u y = 0 answer:
More informationPractice Final Exam Solutions
Important Notice: To prepare for the final exam, one should study the past exams and practice midterms (and homeworks, quizzes, and worksheets), not just this practice final. A topic not being on the practice
More informationNumpy. Luis Pedro Coelho. October 22, Programming for Scientists. Luis Pedro Coelho (Programming for Scientists) Numpy October 22, 2012 (1 / 26)
Numpy Luis Pedro Coelho Programming for Scientists October 22, 2012 Luis Pedro Coelho (Programming for Scientists) Numpy October 22, 2012 (1 / 26) Historical Numeric (1995) Numarray (for large arrays)
More informationErrata for Instructor s Solutions Manual for Gravity, An Introduction to Einstein s General Relativity 1st printing
Errata for Instructor s Solutions Manual for Gravity, An Introduction to Einstein s General Relativity st printing Updated 7/7/003 (hanks to Scott Fraser who provided almost all of these.) Statement of
More information2015 School Year. Graduate School Entrance Examination Problem Booklet. Mathematics
2015 School Year Graduate School Entrance Examination Problem Booklet Mathematics Examination Time: 10:00 to 12:30 Instructions 1. Do not open this problem booklet until the start of the examination is
More informationMath 131 Exam 2 Spring 2016
Math 3 Exam Spring 06 Name: ID: 7 multiple choice questions worth 4.7 points each. hand graded questions worth 0 points each. 0. free points (so the total will be 00). Exam covers sections.7 through 3.0
More informationElementary ODE Review
Elementary ODE Review First Order ODEs First Order Equations Ordinary differential equations of the fm y F(x, y) () are called first der dinary differential equations. There are a variety of techniques
More informationMATH1013 Calculus I. Derivatives II (Chap. 3) 1
MATH1013 Calculus I Derivatives II (Chap. 3) 1 Edmund Y. M. Chiang Department of Mathematics Hong Kong University of Science & Technology October 16, 2013 2013 1 Based on Briggs, Cochran and Gillett: Calculus
More informationENGI 9420 Lecture Notes 1 - ODEs Page 1.01
ENGI 940 Lecture Notes - ODEs Page.0. Ordinary Differential Equations An equation involving a function of one independent variable and the derivative(s) of that function is an ordinary differential equation
More informationMath 67. Rumbos Fall Solutions to Review Problems for Final Exam. (a) Use the triangle inequality to derive the inequality
Math 67. umbos Fall 8 Solutions to eview Problems for Final Exam. In this problem, u and v denote vectors in n. (a) Use the triangle inequality to derive the inequality Solution: Write v u v u for all
More informationHands-on Generating Random
CVIP Laboratory Hands-on Generating Random Variables Shireen Elhabian Aly Farag October 2007 The heart of Monte Carlo simulation for statistical inference. Generate synthetic data to test our algorithms,
More informationConditioning and Stability
Lab 17 Conditioning and Stability Lab Objective: Explore the condition of problems and the stability of algorithms. The condition number of a function measures how sensitive that function is to changes
More informationSolving Systems of ODEs in Python: From scalar to TOV. MP 10/2011
Solving Systems of ODEs in Python: From scalar to TOV. MP 10/2011 Homework: Integrate a scalar ODE in python y (t) =f(t, y) = 5ty 2 +5/t 1/t 2 y(1) = 1 Integrate the ODE using using the explicit Euler
More informationSeparable Equations (1A) Young Won Lim 3/24/15
Separable Equations (1A) Copyright (c) 2011-2015 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or
More informationJim Lambers ENERGY 281 Spring Quarter Lecture 3 Notes
Jim Lambers ENERGY 8 Spring Quarter 7-8 Lecture 3 Notes These notes are based on Rosalind Archer s PE8 lecture notes, with some revisions by Jim Lambers. Introduction The Fourier transform is an integral
More informationDiff. Eq. App.( ) Midterm 1 Solutions
Diff. Eq. App.(110.302) Midterm 1 Solutions Johns Hopkins University February 28, 2011 Problem 1.[3 15 = 45 points] Solve the following differential equations. (Hint: Identify the types of the equations
More informationTwo dimensional oscillator and central forces
Two dimensional oscillator and central forces September 4, 04 Hooke s law in two dimensions Consider a radial Hooke s law force in -dimensions, F = kr where the force is along the radial unit vector and
More information