SlideShare une entreprise Scribd logo
1  sur  15
Linear Partial Differential Equations:
Analysis and Numeric Assignment Help
For any help related queries, call us at: – +1 678 648 4277
You can mail us at:- support@mathhomeworksolver.com or
reach us at:- https://www.mathhomeworksolver.com/
Consider the operator Aˆ= −c(x)Y2 in some 2d region Ω ⊆ R2 with Dirichle
tboundaries (u|∂Ω =0), where c(x) > 0. Suppose the eigen functions of Aˆ are un(x)
with eigen values λn [that is, =Aun λnun] for n =1, 2,..., numbered in order λ1 <λ2
<λ3 < ···. Let G(x, x') be the Green’s function of Aˆ.
(a) If f (x) = n αnun(x) for some coefficients αn = (expression in terms of f
and un), the G(x, x')f (x')d2x' = (in terms of αn and
un).
(b) The maximum possible value of
for any possible u(x), is _____________________ (in terms of quantities
mentioned above). [Hint: min–max. Use the fact, from the handout, that if Aˆis
self-adjoint then Aˆ−1 is also self-adjoint.]
Problem 2:
In this problem, we will solve the Laplacian eigen problem −Y2u = λu in a 2d
radius-1 cylinder r ≤ 1 with Dirichlet boundary conditions u|r=1Ω =0 by “brute
force” in Julia with a 2d finite-difference discretization, and compare to the
analytical Bessel solutions.
mathhomeworksolver.com
Problem
You will find the IJulia notebooks posted on the 18.303 website for Lecture 9 and
Lecture 11 extremely useful! (Note: when you open the notebook, you can choose
“Run All” from the Cell menu to load all the commands in it.)
(a) Using the notebook for a 100 × 100 grid, compute the 6 smallest-magnitude
eigen values and eigen functions of A with λi, Ui=eigs(Ai,nev=6,which=”SM”). The
eigen values are given by λi. The notebook also shows how to compute the exact
eigen value from the square of the root of the Bessel function. Compared with the
high-accuracy λ1 value, compute the error Δλ1 in the corresponding finite-difference
eigen value from the previous part. Also compute Δλ1 for Nx = Ny = 200 and 400.
How fast is the convergence rate with Δx? Can you explain your results, in light of
the fact that the center-difference approximation we are using has an error that is
supposed to be ∼ Δx2? (Hint: think about how accurately the boundary condition on
∂Ω is described in this finite-difference approximation.)
(b) Modify the above code to instead discretize Y·cY, by writing A0 as −GTCgG for
some G matrix that implements Y and for some Cg matrix that multiplies the gradient
by c(r)= r2 +1. Draw a sketch of the grid points at which the components of Y are
discretized—these will not be the same as the (nx,ny) where u is discretized,
because of the centered differences. Be careful that you need to evaluate c at the Y
grid points now! Hint: you can make the matrix (M1/M2)in Julia by the syntax
[M1;M2].
mathhomeworksolver.com
Hint: Notice in the IJulia notebook from Lecture 11 how a matrix r is created from a
column-vector of x values and a row-vector of y values. You will need to modify
these x and/or y values to evaluate r on a new grid(s). Given the r matrix rc on this
new grid, you can evaluate c(r) on the grid by c = rc.^2+1, and then make a
diagonal sparse matrix of these values by spdiagm(reshape(c, prod(size(c)))).
(c) Using this A ≈ Y· cY, compute the smallest-|λ| eigensolution and plot it. Given the
eigenfunction converted to a 2d Nx × Ny array u, as in the Lecture 11 notebook, plot
u(r) as a function of r, along with a plot of the exact Bessel eigenfunction J0(k0r)
from the c =1 case for comparison.
plot(r[Nx/2:end,Ny/2], u[Nx/2:end,Ny/2]) k0 = so.newton(x -> besselj(0,x), 2.0)
plot(0:0.01:1, besselj(0, k0 * (0:0.01:1))/50)
Here, I scaled J0(k0r) by 1/50, but you should change this scale factor as needed to
make the plots of comparable magnitudes. Note also that the r array here is the
radius evaluated on the original u grid, as in the Lecture 11 notebook.
Can you qualitatively explain the differences?
Problem 3:
Recall that the displacement u(x, t) of a stretched string [with fixed ends: u(0,t)= u(L,
t)=0]
mathhomeworksolver.com
satisfies the wave equation where f(x, t) is an external force
density (pressure) on the string.
(a) Suppose that f(x, t)= �[g(x)e−iωt], an oscillating force with a frequency ω. Show
that, instead of solving the wave equation with this f(x, t), we can instead use a
complex force f˜(x, t)= g(x)e−iωt, solve for a complex u˜(x, t), and then take u =
�u˜to obtain the solution for the original f(x, t).
(b) Suppose that f(x, t)= g(x)e−iωt, and we want to find a steady-state solution u(x,
t)=
−iωt
v(x)ethat is oscillating everywhere at the same frequency as the input force. (This
will be the solution after a long time if there is any dissipation in the system to
allow the initial transients to die away.) Write an equation ˆ= A self-adjoint? Av g
that v solves. Is ˆPositive/negative definite/semidefinite?
(c) Solve for the Green’s function G(x, x') of this ˆ A, assuming that ω= nπ/L for any
integer n (i.e. assume ω is not an eigenfrequency [why?]). [Write down the
continuity conditions that G must satisfy at x = x', solve for x= x', and then use the
continuity conditions to eliminate unknowns.]
mathhomeworksolver.com
(d) Form a finite-difference approximation A of your Aˆ. Compute an approximate
G(x, x') in Matlab by A dk, where dk is the unit vector of all 0’s except for one 1/Δx
at index k = x'/Δx, and compare (by plotting both) to your analytical solution from
the previous part for a couple values of x and a couple of different frequencies ω
(one < π/L and one > π/L) with L =1.
(e) Show the limit ω → 0 of your G relates in some expected way to the Green’s
function of –d2/dx2from class.
mathhomeworksolver.com
Problem 1:
(a) is self-ad joint under the inner product from class (and the
1d version in homework), and hence the eigen functions are orthogonal for
distinct eigen values (but not necessarily normalized to IunI =1), hence
The expression u(x)= is just the solution to i.e. it is u = A−1f =
(b) This is just (u, Aˆ−1u)/(u, u), which is a Rayleigh quotient for the self-adjoint
operator Aˆ−1, and hence (thanks to the min–max theorem) it is bounded above
by the largest eigen value of Aˆ−1, which is 1/λ1 (the inverse of the smallest
eigen value of Aˆ). (Note that by positive- definiteness 0 < λ1 < λ2 < · · · .)
Problem 2:
In this problem, we will solve the Laplacian eigen problem in a 2d
radius-1 cylinder r <= 1 with Dirichlet boundary conditions by “brute
force” in Julia with a 2d finite- difference discretization, and compare to the
analytical Bessel solutions. You will find the IJulia notebooks posted on the 18.303
website for Lecture 9 and Lecture 11 extremely useful! (Note: when you open the
notebook, you can choose “Run All” from the Cell menu to load all the commands
in it.)
Solutions
mathhomeworksolver.com
(a) Using the notebook for a 100 X 100 grid, compute the 6 smallest-magnitude
eigen values and eigen functions of A with λi, Ui= eigs(Ai, nev=6,which=”SM”).
The eigen values are given by λi. The notebook also shows how to compute the
exact eigen value from the square of the root of the Bessel function. Compared
with the high-accuracy λ1 value, compute the error Δλ1 in the corresponding
finite-difference eigen value from the previous part. Also compute Δλ1 for Nx = Ny
= 200 and 400. How fast is the convergence rate with Δx? Can you explain your
results, in light of the fact that the center-difference approximation we are using
has an error that is supposed to be Δx2? (Hint: think about how accurately the
boundary condition on ∂Ω is described in this finite-difference approximation.)
(b) Modify the above code to instead discretize by writing A0 as −GT CgG for
some G matrix that implements and for some Cg matrix that multiplies the
gradient by c(r)= r2 +1. Draw a sketch of the grid points at which the components
of are discretized—these will not be the same as the (nx,ny) where u is
discretized, because of the centered differences. Be careful that you need to
evaluate c at the grid points now! Hint: you can make the matrix (M1 M2 ) in
Julia by the syntax [M1;M2].
Hint: how a matrix r is created from a column-vector of x values and a row-vector of
y values. You will need to modify these x and/or y values to evaluate r on a new
grid(s). Given the r matrix rc on this new grid, you can evaluate c(r) on the grid by c
= rc.^2+1, and then make a diagonal sparse matrix of these values by
spdiagm(reshape(c, prod(size(c)))).
mathhomeworksolver.com
Using this A ≈' · c', compute the smallest-|λ| eigensolution and plot it. Given the
eigenfunction converted to a 2d Nx × Ny array u, as in the Lecture 11 notebook,
plot u(r) as a function of r, along with a plot of the exact Bessel eigenfunction
J0(k0r) from the c =1 case for comparison.
plot(r[Nx/2:end,Ny/2], u[Nx/2:end,Ny/2]) k0 = so.newton(x -> besselj(0,x), 2.0)
plot(0:0.01:1, besselj(0, k0 * (0:0.01:1))/50)
1 Here, I scaled J0(k0r) by 1/50, but you should change this scale factor as needed
to make the plots of comparable magnitudes. Note also that the r array here is the
radius evaluated on the original u grid, as in the Lecture 11 notebook.
Can you qualitatively explain the differences?
Problem 3:
Recall that the displacement u(x, t) of a stretched string [with fixed ends: u(0,t)=
u(L, t)=0]
uu
satisfies the wave equation ∂2 +f(x, t)= ∂2 , where f(x, t) is an external force density
(pressure)
∂x2 ∂t2
on the string.
∂2
u˜u˜
mathhomeworksolver.com
(a) Suppose that u˜solves ∂2 + f˜(x, t)= and satisfies u˜(0,t)= u˜(L, t)=0. Now,
consider
∂x2 ∂t2
u˜+u˜¯
u = �u˜= . Clearly, u(0,t)= u(L, t)=0, so u satisfies the same boundary conditions.
It
2
also satisfies the PDE:
since f = ˜˜¯= �f˜. The key factors that allowed us to do this are (i) linearity, and (ii)
the 2 real-ness of the PDE (the PDE itself contains no i factors or other complex
coefficients).
(b) Plugging u(x, t)= v(x)e−iωt and f(x, t)= g(x)e−iωt into the PDE, we obtain
and The boundary conditions are v(0) = v(L)=0, from the boundary
conditions on u
mathhomeworksolver.com
Since ω2 is real, this is in the general Sturm-Liouville form that we showed in
class is selfadjoint.
Subtracting a constant from an operator just shifts all of the eigenvalues by that
constant, keeping the eigenfunctions the same. Thus Aˆis still positive-definite if
ω2 is < the smallest eigenvalue of −∂2/∂x2, and positive semidefinite if ω2 = the
smallest eigenvalue. In this case, we know analytically that the eigenvalues of
−∂2/∂x2 with these boundary conditions are (nπ/L)2 for n =1, 2,.... So Aˆis positive-
definite if ω2 < (π/L)2, it is positive-semidefinite if ω2 =(π/L)2, and it is indefinite
otherwise.
(c) We know that ˆ')=0 for x x'. Also, just as in class and as in the notes, the fact
AG(x, x = that ˆ')= ') meas that G must be continuous (otherwise there would be a
δ'
AG(x,x δ(x − x factor) and ∂G/∂x must have a jump discontinuity:
for −∂2G/∂x2 to give δ(x − x'). We could also show this more explicitly by
integrating:
which gives the same result.
mathhomeworksolver.com
Now, similar to class, we will solve it separately for x<x and for x>x', and then
impose the continuity requirements at x = x to find the unknown coefficients.
For x<x , AG =0 means that ∂2 = −ω2G, hence G(x, x') is some sine or cosine of
ωx. But since G(0,x')=0, we must therefore have G(x, x')= α sin(ωx) for some
coefficient α.
Similarly, for x > x', we also have a sine or cosine of ωx. To get G(L, x') = 0, the
simplest way to do this is to use a sine with a phase shift: G(x, x') = β sin(ω[L x])
for some coefficient β.
Continuity now gives two equations in the two unknowns α and β:
which has the solution
This simplifies a bit from the identity sinAcosB + cosB sinA = sin(A + B), and
hence
which obviously obeys reciprocity.
mathhomeworksolver.com
Note that if ω is an eigen frequency, i.e. ω = nπ/L for some n, then this G blows
up.
The reason is that Ain that case is singular (the nth eigen value was shifted to
zero), and defining A -1 ˆis more problematical. (Physically, this corresponds to
driving the oscillating string at a resonance frequency, which generally leads to a
diverging solution unless there is dissipation in the system.)
(d) It is critical to get the signs right. Recall that we approximated d/dx2 by −DTD
for a 1st derivative matrix D. Therefore, you want to make a matrix A = DTD − ω2I.
In Matlab, A = D’*D -omega^2 * eye(N) where N is the size of the matrix D =
diff1(N) / dx with dx = 1/(N+1). We make dk by dk = zeros(N,1); dk(k) = 1/dx. I
used N = 100.
The resulting plots are shown in figure 1, for ω =0.4π/L (left) and ω =5.4π/L (right)
and x’ =0.5 and 0.75. As expected, for ω < π/L where it is positive-definite, the
Green’s function is positive and qualitatively similar to that for ω =0, except that it
is slightly curved. For larger ω, though, it becomes oscillatory and much more
interesting in shape. The exact G and the finite-difference G match very well, as
they should, although the match becomes worse at higher frequencies—the
difference approximations become less and less accurate as the function
becomes more and more oscillatory relative to the grid Δx, just as was the case
mathhomeworksolver.com
for the eigenfunctions as discussed in class.
[If you try to plug in an eigenfrequency (e.g. 4π/L) for ω, you may notice that the
exact G blows up but the finite-difference G is finite. The reason for this is simple:
the eigenvalues of the finite-difference matrix DTD are not exactly (nπ/L)2, so the
matrix is not exactly singular, nor is it realistically possible to make it exactly
singular thanks to rounding errors. If you plug in something very close to an
eigenfrequency, then G becomes very close to an eigenfunction multipled by a
large amplitude. It is easy to see why this is if you look at the expansion of the
solution in terms of the eigenfunctions.]
mathhomeworksolver.com
(e) For small ω, sin(ωy) ≈ ωy for any y, and hence
which matches the Green’s function of –d2/dx2 from class. (Equivalently, you
get 0/0 as ω → 0 and hence must use L’Hôpital’s rule or similar to take the
limit.)
mathhomeworksolver.com

Contenu connexe

Similaire à Numerical Analysis Assignment Help

Consider a l-D elastic bar problem defined on [0, 4]. The domain .pdf
Consider a l-D elastic bar problem defined on [0, 4]. The domain .pdfConsider a l-D elastic bar problem defined on [0, 4]. The domain .pdf
Consider a l-D elastic bar problem defined on [0, 4]. The domain .pdf
feroz544
 
On the lambert w function
On the lambert w functionOn the lambert w function
On the lambert w function
TrungKienVu3
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
anhlodge
 
machinelearning project
machinelearning projectmachinelearning project
machinelearning project
Lianli Liu
 

Similaire à Numerical Analysis Assignment Help (20)

Consider a l-D elastic bar problem defined on [0, 4]. The domain .pdf
Consider a l-D elastic bar problem defined on [0, 4]. The domain .pdfConsider a l-D elastic bar problem defined on [0, 4]. The domain .pdf
Consider a l-D elastic bar problem defined on [0, 4]. The domain .pdf
 
Exp integrals
Exp integralsExp integrals
Exp integrals
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment Help
 
Design & Analysis of Algorithms Assignment Help
Design & Analysis of Algorithms Assignment HelpDesign & Analysis of Algorithms Assignment Help
Design & Analysis of Algorithms Assignment Help
 
On the lambert w function
On the lambert w functionOn the lambert w function
On the lambert w function
 
Density theorems for Euclidean point configurations
Density theorems for Euclidean point configurationsDensity theorems for Euclidean point configurations
Density theorems for Euclidean point configurations
 
Computer Network Homework Help
Computer Network Homework HelpComputer Network Homework Help
Computer Network Homework Help
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
Sol63
Sol63Sol63
Sol63
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 
Final
FinalFinal
Final
 
My paper for Domain Decomposition Conference in Strobl, Austria, 2005
My paper for Domain Decomposition Conference in Strobl, Austria, 2005My paper for Domain Decomposition Conference in Strobl, Austria, 2005
My paper for Domain Decomposition Conference in Strobl, Austria, 2005
 
machinelearning project
machinelearning projectmachinelearning project
machinelearning project
 
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014) DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
 
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
 
Ch07 6
Ch07 6Ch07 6
Ch07 6
 
Digtial Image Processing Q@A
Digtial Image Processing Q@ADigtial Image Processing Q@A
Digtial Image Processing Q@A
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...
 
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
 

Plus de Math Homework Solver

Plus de Math Homework Solver (16)

Linear Algebra Assignment Help
Linear Algebra Assignment Help Linear Algebra Assignment Help
Linear Algebra Assignment Help
 
Linear Algebra Communications Assignment Help
Linear Algebra Communications Assignment HelpLinear Algebra Communications Assignment Help
Linear Algebra Communications Assignment Help
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment Help
 
Maths Assignment Help
Maths Assignment HelpMaths Assignment Help
Maths Assignment Help
 
Complex Variables Assignment Help
Complex Variables Assignment HelpComplex Variables Assignment Help
Complex Variables Assignment Help
 
Math Assignment Help
Math Assignment HelpMath Assignment Help
Math Assignment Help
 
Math Homework Help
Math Homework HelpMath Homework Help
Math Homework Help
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
 
Calculus Assignment Help
 Calculus Assignment Help Calculus Assignment Help
Calculus Assignment Help
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
 
Calculus Assignment Help
Calculus Assignment HelpCalculus Assignment Help
Calculus Assignment Help
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 
Differential Equations Homework Help
Differential Equations Homework HelpDifferential Equations Homework Help
Differential Equations Homework Help
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 

Dernier

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

Numerical Analysis Assignment Help

  • 1. Linear Partial Differential Equations: Analysis and Numeric Assignment Help For any help related queries, call us at: – +1 678 648 4277 You can mail us at:- support@mathhomeworksolver.com or reach us at:- https://www.mathhomeworksolver.com/
  • 2. Consider the operator Aˆ= −c(x)Y2 in some 2d region Ω ⊆ R2 with Dirichle tboundaries (u|∂Ω =0), where c(x) > 0. Suppose the eigen functions of Aˆ are un(x) with eigen values λn [that is, =Aun λnun] for n =1, 2,..., numbered in order λ1 <λ2 <λ3 < ···. Let G(x, x') be the Green’s function of Aˆ. (a) If f (x) = n αnun(x) for some coefficients αn = (expression in terms of f and un), the G(x, x')f (x')d2x' = (in terms of αn and un). (b) The maximum possible value of for any possible u(x), is _____________________ (in terms of quantities mentioned above). [Hint: min–max. Use the fact, from the handout, that if Aˆis self-adjoint then Aˆ−1 is also self-adjoint.] Problem 2: In this problem, we will solve the Laplacian eigen problem −Y2u = λu in a 2d radius-1 cylinder r ≤ 1 with Dirichlet boundary conditions u|r=1Ω =0 by “brute force” in Julia with a 2d finite-difference discretization, and compare to the analytical Bessel solutions. mathhomeworksolver.com Problem
  • 3. You will find the IJulia notebooks posted on the 18.303 website for Lecture 9 and Lecture 11 extremely useful! (Note: when you open the notebook, you can choose “Run All” from the Cell menu to load all the commands in it.) (a) Using the notebook for a 100 × 100 grid, compute the 6 smallest-magnitude eigen values and eigen functions of A with λi, Ui=eigs(Ai,nev=6,which=”SM”). The eigen values are given by λi. The notebook also shows how to compute the exact eigen value from the square of the root of the Bessel function. Compared with the high-accuracy λ1 value, compute the error Δλ1 in the corresponding finite-difference eigen value from the previous part. Also compute Δλ1 for Nx = Ny = 200 and 400. How fast is the convergence rate with Δx? Can you explain your results, in light of the fact that the center-difference approximation we are using has an error that is supposed to be ∼ Δx2? (Hint: think about how accurately the boundary condition on ∂Ω is described in this finite-difference approximation.) (b) Modify the above code to instead discretize Y·cY, by writing A0 as −GTCgG for some G matrix that implements Y and for some Cg matrix that multiplies the gradient by c(r)= r2 +1. Draw a sketch of the grid points at which the components of Y are discretized—these will not be the same as the (nx,ny) where u is discretized, because of the centered differences. Be careful that you need to evaluate c at the Y grid points now! Hint: you can make the matrix (M1/M2)in Julia by the syntax [M1;M2]. mathhomeworksolver.com
  • 4. Hint: Notice in the IJulia notebook from Lecture 11 how a matrix r is created from a column-vector of x values and a row-vector of y values. You will need to modify these x and/or y values to evaluate r on a new grid(s). Given the r matrix rc on this new grid, you can evaluate c(r) on the grid by c = rc.^2+1, and then make a diagonal sparse matrix of these values by spdiagm(reshape(c, prod(size(c)))). (c) Using this A ≈ Y· cY, compute the smallest-|λ| eigensolution and plot it. Given the eigenfunction converted to a 2d Nx × Ny array u, as in the Lecture 11 notebook, plot u(r) as a function of r, along with a plot of the exact Bessel eigenfunction J0(k0r) from the c =1 case for comparison. plot(r[Nx/2:end,Ny/2], u[Nx/2:end,Ny/2]) k0 = so.newton(x -> besselj(0,x), 2.0) plot(0:0.01:1, besselj(0, k0 * (0:0.01:1))/50) Here, I scaled J0(k0r) by 1/50, but you should change this scale factor as needed to make the plots of comparable magnitudes. Note also that the r array here is the radius evaluated on the original u grid, as in the Lecture 11 notebook. Can you qualitatively explain the differences? Problem 3: Recall that the displacement u(x, t) of a stretched string [with fixed ends: u(0,t)= u(L, t)=0] mathhomeworksolver.com
  • 5. satisfies the wave equation where f(x, t) is an external force density (pressure) on the string. (a) Suppose that f(x, t)= �[g(x)e−iωt], an oscillating force with a frequency ω. Show that, instead of solving the wave equation with this f(x, t), we can instead use a complex force f˜(x, t)= g(x)e−iωt, solve for a complex u˜(x, t), and then take u = �u˜to obtain the solution for the original f(x, t). (b) Suppose that f(x, t)= g(x)e−iωt, and we want to find a steady-state solution u(x, t)= −iωt v(x)ethat is oscillating everywhere at the same frequency as the input force. (This will be the solution after a long time if there is any dissipation in the system to allow the initial transients to die away.) Write an equation ˆ= A self-adjoint? Av g that v solves. Is ˆPositive/negative definite/semidefinite? (c) Solve for the Green’s function G(x, x') of this ˆ A, assuming that ω= nπ/L for any integer n (i.e. assume ω is not an eigenfrequency [why?]). [Write down the continuity conditions that G must satisfy at x = x', solve for x= x', and then use the continuity conditions to eliminate unknowns.] mathhomeworksolver.com
  • 6. (d) Form a finite-difference approximation A of your Aˆ. Compute an approximate G(x, x') in Matlab by A dk, where dk is the unit vector of all 0’s except for one 1/Δx at index k = x'/Δx, and compare (by plotting both) to your analytical solution from the previous part for a couple values of x and a couple of different frequencies ω (one < π/L and one > π/L) with L =1. (e) Show the limit ω → 0 of your G relates in some expected way to the Green’s function of –d2/dx2from class. mathhomeworksolver.com
  • 7. Problem 1: (a) is self-ad joint under the inner product from class (and the 1d version in homework), and hence the eigen functions are orthogonal for distinct eigen values (but not necessarily normalized to IunI =1), hence The expression u(x)= is just the solution to i.e. it is u = A−1f = (b) This is just (u, Aˆ−1u)/(u, u), which is a Rayleigh quotient for the self-adjoint operator Aˆ−1, and hence (thanks to the min–max theorem) it is bounded above by the largest eigen value of Aˆ−1, which is 1/λ1 (the inverse of the smallest eigen value of Aˆ). (Note that by positive- definiteness 0 < λ1 < λ2 < · · · .) Problem 2: In this problem, we will solve the Laplacian eigen problem in a 2d radius-1 cylinder r <= 1 with Dirichlet boundary conditions by “brute force” in Julia with a 2d finite- difference discretization, and compare to the analytical Bessel solutions. You will find the IJulia notebooks posted on the 18.303 website for Lecture 9 and Lecture 11 extremely useful! (Note: when you open the notebook, you can choose “Run All” from the Cell menu to load all the commands in it.) Solutions mathhomeworksolver.com
  • 8. (a) Using the notebook for a 100 X 100 grid, compute the 6 smallest-magnitude eigen values and eigen functions of A with λi, Ui= eigs(Ai, nev=6,which=”SM”). The eigen values are given by λi. The notebook also shows how to compute the exact eigen value from the square of the root of the Bessel function. Compared with the high-accuracy λ1 value, compute the error Δλ1 in the corresponding finite-difference eigen value from the previous part. Also compute Δλ1 for Nx = Ny = 200 and 400. How fast is the convergence rate with Δx? Can you explain your results, in light of the fact that the center-difference approximation we are using has an error that is supposed to be Δx2? (Hint: think about how accurately the boundary condition on ∂Ω is described in this finite-difference approximation.) (b) Modify the above code to instead discretize by writing A0 as −GT CgG for some G matrix that implements and for some Cg matrix that multiplies the gradient by c(r)= r2 +1. Draw a sketch of the grid points at which the components of are discretized—these will not be the same as the (nx,ny) where u is discretized, because of the centered differences. Be careful that you need to evaluate c at the grid points now! Hint: you can make the matrix (M1 M2 ) in Julia by the syntax [M1;M2]. Hint: how a matrix r is created from a column-vector of x values and a row-vector of y values. You will need to modify these x and/or y values to evaluate r on a new grid(s). Given the r matrix rc on this new grid, you can evaluate c(r) on the grid by c = rc.^2+1, and then make a diagonal sparse matrix of these values by spdiagm(reshape(c, prod(size(c)))). mathhomeworksolver.com
  • 9. Using this A ≈' · c', compute the smallest-|λ| eigensolution and plot it. Given the eigenfunction converted to a 2d Nx × Ny array u, as in the Lecture 11 notebook, plot u(r) as a function of r, along with a plot of the exact Bessel eigenfunction J0(k0r) from the c =1 case for comparison. plot(r[Nx/2:end,Ny/2], u[Nx/2:end,Ny/2]) k0 = so.newton(x -> besselj(0,x), 2.0) plot(0:0.01:1, besselj(0, k0 * (0:0.01:1))/50) 1 Here, I scaled J0(k0r) by 1/50, but you should change this scale factor as needed to make the plots of comparable magnitudes. Note also that the r array here is the radius evaluated on the original u grid, as in the Lecture 11 notebook. Can you qualitatively explain the differences? Problem 3: Recall that the displacement u(x, t) of a stretched string [with fixed ends: u(0,t)= u(L, t)=0] uu satisfies the wave equation ∂2 +f(x, t)= ∂2 , where f(x, t) is an external force density (pressure) ∂x2 ∂t2 on the string. ∂2 u˜u˜ mathhomeworksolver.com
  • 10. (a) Suppose that u˜solves ∂2 + f˜(x, t)= and satisfies u˜(0,t)= u˜(L, t)=0. Now, consider ∂x2 ∂t2 u˜+u˜¯ u = �u˜= . Clearly, u(0,t)= u(L, t)=0, so u satisfies the same boundary conditions. It 2 also satisfies the PDE: since f = ˜˜¯= �f˜. The key factors that allowed us to do this are (i) linearity, and (ii) the 2 real-ness of the PDE (the PDE itself contains no i factors or other complex coefficients). (b) Plugging u(x, t)= v(x)e−iωt and f(x, t)= g(x)e−iωt into the PDE, we obtain and The boundary conditions are v(0) = v(L)=0, from the boundary conditions on u mathhomeworksolver.com
  • 11. Since ω2 is real, this is in the general Sturm-Liouville form that we showed in class is selfadjoint. Subtracting a constant from an operator just shifts all of the eigenvalues by that constant, keeping the eigenfunctions the same. Thus Aˆis still positive-definite if ω2 is < the smallest eigenvalue of −∂2/∂x2, and positive semidefinite if ω2 = the smallest eigenvalue. In this case, we know analytically that the eigenvalues of −∂2/∂x2 with these boundary conditions are (nπ/L)2 for n =1, 2,.... So Aˆis positive- definite if ω2 < (π/L)2, it is positive-semidefinite if ω2 =(π/L)2, and it is indefinite otherwise. (c) We know that ˆ')=0 for x x'. Also, just as in class and as in the notes, the fact AG(x, x = that ˆ')= ') meas that G must be continuous (otherwise there would be a δ' AG(x,x δ(x − x factor) and ∂G/∂x must have a jump discontinuity: for −∂2G/∂x2 to give δ(x − x'). We could also show this more explicitly by integrating: which gives the same result. mathhomeworksolver.com
  • 12. Now, similar to class, we will solve it separately for x<x and for x>x', and then impose the continuity requirements at x = x to find the unknown coefficients. For x<x , AG =0 means that ∂2 = −ω2G, hence G(x, x') is some sine or cosine of ωx. But since G(0,x')=0, we must therefore have G(x, x')= α sin(ωx) for some coefficient α. Similarly, for x > x', we also have a sine or cosine of ωx. To get G(L, x') = 0, the simplest way to do this is to use a sine with a phase shift: G(x, x') = β sin(ω[L x]) for some coefficient β. Continuity now gives two equations in the two unknowns α and β: which has the solution This simplifies a bit from the identity sinAcosB + cosB sinA = sin(A + B), and hence which obviously obeys reciprocity. mathhomeworksolver.com
  • 13. Note that if ω is an eigen frequency, i.e. ω = nπ/L for some n, then this G blows up. The reason is that Ain that case is singular (the nth eigen value was shifted to zero), and defining A -1 ˆis more problematical. (Physically, this corresponds to driving the oscillating string at a resonance frequency, which generally leads to a diverging solution unless there is dissipation in the system.) (d) It is critical to get the signs right. Recall that we approximated d/dx2 by −DTD for a 1st derivative matrix D. Therefore, you want to make a matrix A = DTD − ω2I. In Matlab, A = D’*D -omega^2 * eye(N) where N is the size of the matrix D = diff1(N) / dx with dx = 1/(N+1). We make dk by dk = zeros(N,1); dk(k) = 1/dx. I used N = 100. The resulting plots are shown in figure 1, for ω =0.4π/L (left) and ω =5.4π/L (right) and x’ =0.5 and 0.75. As expected, for ω < π/L where it is positive-definite, the Green’s function is positive and qualitatively similar to that for ω =0, except that it is slightly curved. For larger ω, though, it becomes oscillatory and much more interesting in shape. The exact G and the finite-difference G match very well, as they should, although the match becomes worse at higher frequencies—the difference approximations become less and less accurate as the function becomes more and more oscillatory relative to the grid Δx, just as was the case mathhomeworksolver.com
  • 14. for the eigenfunctions as discussed in class. [If you try to plug in an eigenfrequency (e.g. 4π/L) for ω, you may notice that the exact G blows up but the finite-difference G is finite. The reason for this is simple: the eigenvalues of the finite-difference matrix DTD are not exactly (nπ/L)2, so the matrix is not exactly singular, nor is it realistically possible to make it exactly singular thanks to rounding errors. If you plug in something very close to an eigenfrequency, then G becomes very close to an eigenfunction multipled by a large amplitude. It is easy to see why this is if you look at the expansion of the solution in terms of the eigenfunctions.] mathhomeworksolver.com
  • 15. (e) For small ω, sin(ωy) ≈ ωy for any y, and hence which matches the Green’s function of –d2/dx2 from class. (Equivalently, you get 0/0 as ω → 0 and hence must use L’Hôpital’s rule or similar to take the limit.) mathhomeworksolver.com