SlideShare a Scribd company logo
1 of 20
For Any Assignment 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/
Problem 1 : Modified inner products for column vectors
Consider the inner product (x, y) = x∗By from class (lecture 5.5 notes), where the
vectors are in CN and B is an N × N Hermitian positive-definite matrix.
(a) Show that this inner product satisfies the required properties of inner products
from class: (x, y) = (y, x), (x, x) > 0 except for x = 0. (Linearity (x, αy+z) = α(x,
y)+(x, z) is obvious from linearity the of matrix operations; you need not show it.)
(b) If M is an arbitrary (possibly complex) N × N matrix, define the adjoint M† by (x,
My) = (M† x, y) (for all x, y). (In this problem, we use † instead of ∗ for the
adjoint in order to avoid confusion with the conjugate transpose: for this inner
product, the adjoint MT is not the conjugate transpose M∗ = MT .) Give an explicit
formula for M† in terms of M and B .
(c) Using your formula from above, show that M† = M (i.e., M is self-
adjoint/Hermitian for this inner product) if M = B−1A for some A = A∗ .
Problem 2: Finite-difference approximations
For this question you may find it helpful to refer to the notes and readings from lecture
3. Suppose that we want to compute the operation
mathhomeworksolver.com
for some smooth function c(x) (you can assume c has a convergent Taylor series
everywhere). Now, we want to construct a finite-difference approximation for Aˆ with
u(x) on Ω = [0, L] and Dirichlet boundary conditions u(0) = u(L) = 0, similar to class,
approximating u(mΔx) ≈ um for M equally spaced points m = 1, 2, . . . , M, u0 =
uM+1 = 0, and Δx =
(a) Using center-difference operations, construct a finite-difference approximation for
Au ˆ evaluated at mΔx. (Hint: use a centered first-derivative evaluated at grid
points m + 0.5, as in class, followed by multiplication by c, followed by another
centered first derivative. Do not ′ ′ ′′ separate Au ˆ by the product rule into c’ u’ +
cu” first, as that will make the factorization in part (d) more difficult.)
(b) Show that your finite-difference expressions correspond to approximating Au ˆ by
Au where u is the column vector of the M points um and A is a real-symmetric
matrix of the form A = −DTCD (give C, and show that D is the same as the 1st-
derivative matrix from lecture).
mathhomeworksolver.com
(c) In Julia, the diagm(c) command will create a diagonal matrix from a vector c. The
function diff1(M) = [ [1.0 zeros(1,M-1)]; diagm(ones(M-1),1) - eye(M) ] will allow
you to create the (M + 1)×M matrix D from class via D = diff1(M) for any given value
of M. Using these two commands, construct the matrix A from part (d) for M = 100 and
L = 1 and c(x) = e3x via
L = 1
M = 100
D = diff1(M)
dx = L / (M+1)
x = dx*0.5:dx:L # sequence of x values from 0.5*dx to <= L in steps of dx
C = ....something from c(x)...hint: use diagm...
A = -D’ * C * D / dx^2
You can now get the eigenvalues and eigenvectors by λ, U = eig(A), where λ is an array
of eigenvalues and U is a matrix whose columns are the corresponding eigenvectors
(notice that all the λ are < 0 since A is negative-definite).
using PyPlot plot
(dx:dx:L-dx, U[:,end-3:end])
xlabel("x"); ylabel("eigenfunctions")
legend(["fourth", "third", "second", "first"])
mathhomeworksolver.com
(ii) Verify that the first two eigenfunctions are indeed orthogonal with dot(U[:,end],
U[:,end-1]) in Julia, which should be zero up to roundoff errors
(iii) Verify that you are getting second-order convergence of the eigenvalues: compute
the smallest-magnitude eigenvalue λM [end] for M = 100, 200, 400, 800 and check
that the differences are decreasing by roughly a factor of 4 (i.e. |λ100 − λ200| should
be about 4 times larger than |λ200 − λ400|, and so on), since doubling the resolution
should multiply errors by 1/4.
(d) For c(x) = 1, we saw in class that the eigenfunctions are sin(nπx/L). How do these
compare to the eigenvectors you plotted in the previous part? Try changing c(x) to
some other function (note: still needs to be real and > 0), and see how different you
can make the eigenfunctions from sin(nπx/L). Is there some feature that always
remains similar, no matter how much you change c?
Problem 3: Discrete diffusion
In this problem, you will examine thermal conduction in a system of a finite number N
of pieces, and then take the N → ∞ limit to recover the heat equation. In particular:
mathhomeworksolver.com
• You have a metal bar of length L and cross-sectional area a (hence a volume La),
with a varying temperature T along the rod. We conceptually subdivide the rod into N
(touching) pieces of length Δx = L/N.
• If Δx is small, we can approximate each piece as having a uniform temperature Tn
within the piece (n = 1, 2, . . . , N), giving a vector T of N temperatures.
• Suppose that the rate q (in units of W) at which heat flows across the boundary from
piece n to piece n + 1 is given by q = where κ is the metal’s
thermal conductivity (in units of W/m·K). That is, piece n loses energy at a rate q, and
piece n + 1 gains energy at the same rate, and the heat flows faster across bigger
areas, over shorter distances, or for larger temperature differences. Note that q > 0 if
Tn > Tn+1 and q < 0 if Tn < Tn+1: heat flows from the hotter piece to the cooler
piece.
• If an amount of heat ΔQ (in J) flows into a piece, its temperature changes by ΔT =
ΔQ/(cρaΔx), where c is the specific heat capacity (in J/kg·K) and ρ is the density
(kg/m3) of the metal.
• The rod is insulated: no heat flows out the sides or through the ends.
Given these assumptions, you should be able to answer the following:
mathhomeworksolver.com
(a) “Newton’s law of cooling” says that that the temperature of an object changes at a
rate (K/s) proportional to the temperature difference with its surroundings. Derive
the equivalent here: show that our assumptions above imply that
for some constant α, for 1 < n < N. Also give the
(slightly different) equations for n = 1 and n = N.
(b) Write your equation from the previous part in matrix form:
for some matrix A.
(c) Let T (x, t) be the temperature along the rod, and suppose Tn(t) = T ([n − 0.5]Δx,
t) (the temperature at the center of the n-th piece). Take the limit N → ∞ (with L
fixed, so that and derive a partial differential equation
What is Aˆ? (Don’t worry about the x = 0, L ends until the next part.)
(d) What are the boundary conditions on T (x, t) at x = 0 and L? Check that if you go
backwards, and form a center-difference approximation of Aˆ with these boundary
conditions, that you recover the matrix A from above.
(e) How does your Aˆ change in the N → ∞ limit if the conductivity is a function
κ(x) of x?
mathhomeworksolver.com
(f) Suppose that instead of a thin metal bar (1d), you have an L × L thin metal plate
(2d), with a temperature T (x, y, t) and a constant conductivity κ. If you go through
the steps above dividing it into N × N little squares of size Δx × Δy, what PDE do you
get for T in the limit N → ∞? (Many of the steps should be similar to above.)
mathhomeworksolver.com
Problem 1
(a) We have (x, x) = x∗Bx > 0 for x = 0 by definition of positive-definiteness. We
have (x, y) = ∗ ∗ x∗By = (B∗x) y = (Bx) y = y∗(Bx) = (y, x) by B = B∗.
(b) (x, My) = x∗BMy = (M†x, y) = x∗M†∗By for all x, y, and hence we must have BM
= M†∗B ∗ , or M†∗ = BMB−1 =⇒ M† = (BMB−1) = (B−1)∗M∗B∗ . Using the fact
that
(c) If M = B−1A where A = A∗, then M† = B−1AB−1B = B−1A = M. Q.E.D.
Problem 2:
(a) As in class, let u' ([m + 0.5]Δx) ≈ u’m+0.5 = Define cm+0.5 = c([m
+ 0.5]Δx). Now we want to take the derivative of in order to
approximate Au at m by a center .5 difference:
There are other ways to solve this problem of course, that are also second-order
accurate.
mathhomeworksolver.com
(b) In order to approximate Au, we did three things: compute u' by a center-difference
as in class, multiply by cm+0.5 at each point m + 0.5, then compute the derivative by
another center-difference. The first and last steps are exactly the same center-
difference steps as in class, so they correspond as in class to multiplying by D and
−DT , respectively, where D is the (M + 1) × M matrix
The middle step, multiplying the (M + 1)-component vector u' by cm+0.5 at each
point is just multiplication by a diagonal (M + 1) × (M + 1) matrix
mathhomeworksolver.com
Putting these steps together in sequence, from right to left, means that A = −DT CD
(c) In Julia, the diagm(c) command will create a diagonal matrix from a vector c. The
function diff1(M) = [ [1.0 zeros(1,M-1)]; diagm(ones(M-1),1) - eye(M) ] will allow
you to create the (M + 1) × M matrix D from class via D = diff1(M) for any given
value of M. Using these two commands, we construct the matrix A from part (d) for
M = 100 3x and L = 1 and c(x) = e3x via
L=1
M = 100
D = diff1(M)
mathhomeworksolver.com
dx = L / (M+1)
x = dx*0.5:dx:L # sequence of x values from 0.5*dx to <= L in steps of dx
c(x) = exp(3x)
C = diagm(c(x))
A = -D’ *C*D / dx^2
You can now get the eigenvalues and eigenvectors by λ, U = eig(A), where λ is an
array of eigenvalues and U is a matrix whose columns are the corresponding
eigenvectors (notice that all the λ are < 0 since A is negative-definite).
(i) The plot is shown in Figure 1. The eigenfunctions look vaguely “sine-like”—they
have the same number of oscillations as sin(nπx/L) for n = 1, 2, 3, 4—but are
“squeezed” to the left-hand side.
(ii) We find that the dot product is ≈ 4.3 × 10−16, which is zero up to roundoff errors
(your exact value may differ, but should be of the same order of magnitude).
(iii) In the posted IJulia notebook for the solutions, we show a plot of |λ2M −λM| as a
function of M on a log–log scale, and verify that it indeed decreases ∼ 1/M2.
mathhomeworksolver.com
You can also just look at the numbers instead of plotting, and we find that this
difference decreases by a factor of ≈ 3.95 from M = 100 to M = 200 and by a factor of
≈ 3.98 from M = 200 to M = 400, almost exactly the expected factor of 4. (For fun, in
the solutions I went to M = 1600, but you only needed to go to M = 800.)
(d) In general, the eigenfunctions have the same number of nodes (sign oscillations) as
sin(nπx/L), but the oscillations pushed towards the region of high c(x). This is even
more dramatic if we increase the c(x) contrast. In Figure xxx, we show two examples.
First, c(x) = e20x, in which all of the functions are squished to the left where c is
small. Second c(x)=1 for x < 0.3 and 100 otherwise—in this case, the oscillations are
at the left 1/3 where c is small, but the function is not zero in the right 2/3. Instead, the
function is nearly constant where c is large. The reason for this has to do with the
continuity of u: it is easy to see from the operator that ' ' )' ' cu must be continuous for
(cu to exist, and hence the slope u must decrease by a factor of
mathhomeworksolver.com
Figure 2: First four eigenfunctions of Au = (cu for two different choices of c(x).
mathhomeworksolver.com
100 for x > 0.3, leading to a u that is nearly constant. (We will explore some of these
issues further later in the semester.)
Problem 3:
(a) The heat capacity equation tells us that where dQn/dt is the rate
of change of the heat in the n-th piece. The thermal conductivity equation tells us
that dQn/dt, in turn, is equal to the sum of the rates q at which heat flows from n +
1 and n − 1 into n:
where The only difference for T1 and TN is that they have no heat flow
n − 1 and n + 1, respectively, since the ends are insulated:
α(TN−1 − TN ).
(b) We can obtain A in two ways. First, we can simply look directly at our equations
above, Which give corresponding rows of the
matrix
mathhomeworksolver.com
Alternatively, we can write each of the above steps—differentiating T to get the rate of
heat flow q to the left at each of the N −1 interfaces between the pieces, then taking
the difference of the q’s to get dT /dt, in matrix form, to write:
in terms of the D matrix from class (except with N reduced by 1), which gives the
same A as above. As we will see in the parts below, this is indeed a second-derivative
approximation, but with different boundary conditions—Neumann conditions—than
the Dirichlet conditions in class.
mathhomeworksolver.com
By the way, it is interesting to consider −DDT , compared to the −DT D we had in
class. Clearly, −DDT is real-symmetric and negative semidefinite. It is not, however,
negative definite, since DT does not (and cannot) have full column rank (its rank must
be ≤ the number of rows N − 1, and in fact in class we showed that it has rank N − 1).
(c) Ignoring the ends for the moment, for all the interior points we have
which is exactly our familiar center-difference
approximation for at the point n (x = [n − 0.5]Δx). Hence,
everywhere in the interior our equations converge to and
thus
(d) The boundary conditions are The easiest way to see this is to
observe that our heat flow q is really a first derivative, and zero heat flow at the ends
Means zero derivatives. That is, qn+0.5 = is really an approximate
derivative:
qN+0.5 to/from n = 0 and n = N + 1 is zero, and hence q0.5 = qN+0.5 = 0 ≈
while the flows q0.5 and
mathhomeworksolver.com
Working backwards, consider (setting 1 for convenience)
with these boundary conditions and center-difference approximations. We are given
Tn = T([n − 0.5]Δx,t) for n = 1,...,N. First, we compute
for n = 1,...,N − 1 (−DT T using the D above). Unlike the Dirichlet case in class,
we don’t com
which are zero by the boundary conditions. Then, we compute our approximate 2nd
derivatives for n = 1,...,N, where we let
using the D from above). This gives
at the endpoints, and
for 1 <n<N,
which are precisely the rows of our A matrix above.
(e) If κ(x), then we get a different κ and α factor for each Tn+1 − Tn difference:
mathhomeworksolver.com
Where
In the N → ∞ limit, this gives
by κ, differentiated again, and then divided by cρ. (You weren’t asked to handle the
case where cρ is not a constant, so it’s okay if you commuted cρ with the derivatives.)
(f) If we discretize to Tm,n = T(mΔx, nΔy), the steps are basically the same except that
we have to consider the heat flow in both the x and y directions, and hence we have to
take differences in both x and y. In particular, suppose the thickness of the block is h. In
this case, heat will flow from Tm,n to Tm+1,n at a rate
we differentiated, multiplied
where hΔy is the area of the interface between the two blocks. Then, to convert into a
rate of temperature change, we will divide by cρhΔxΔy, where hΔxΔy is the volume of
the block. Putting this all together, we obtain:
mathhomeworksolver.com
where the thing in [··· ] is precisely the five-point stencil approximation for ∇2 from
class. Hence, we obtain
where for fun I have put the κ in the middle, which is the right place if κ is not a
constant (you were not required to do this).
mathhomeworksolver.com

More Related Content

Similar to Online Maths Assignment Help

Conjugate Gradient Methods
Conjugate Gradient MethodsConjugate Gradient Methods
Conjugate Gradient Methods
MTiti1
 
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docxMA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
infantsuk
 
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
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
itutor
 

Similar to Online Maths Assignment Help (20)

ALA Solution.pdf
ALA Solution.pdfALA Solution.pdf
ALA Solution.pdf
 
Conjugate Gradient Methods
Conjugate Gradient MethodsConjugate Gradient Methods
Conjugate Gradient Methods
 
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docxMA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
 
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
 
Networking Assignment Help
Networking Assignment HelpNetworking Assignment Help
Networking Assignment Help
 
Computer Network Homework Help
Computer Network Homework HelpComputer Network Homework Help
Computer Network Homework Help
 
Lecture_note2.pdf
Lecture_note2.pdfLecture_note2.pdf
Lecture_note2.pdf
 
Linear Algebra Assignment help
Linear Algebra Assignment helpLinear Algebra Assignment help
Linear Algebra Assignment help
 
Maths Assignment Help
Maths Assignment HelpMaths Assignment Help
Maths Assignment Help
 
Differential Equations Homework Help
Differential Equations Homework HelpDifferential Equations Homework Help
Differential Equations Homework Help
 
Dynamical systems solved ex
Dynamical systems solved exDynamical systems solved ex
Dynamical systems solved ex
 
Sol75
Sol75Sol75
Sol75
 
Sol75
Sol75Sol75
Sol75
 
Calculus Homework Help
Calculus Homework HelpCalculus Homework Help
Calculus Homework Help
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
 
metric spaces
metric spacesmetric spaces
metric spaces
 
Proficient Computer Network Assignment Help
Proficient Computer Network Assignment HelpProficient Computer Network Assignment Help
Proficient Computer Network Assignment Help
 
Calculus Assignment Help
Calculus Assignment HelpCalculus Assignment Help
Calculus 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
 
Solution set 3
Solution set 3Solution set 3
Solution set 3
 

More from Math Homework Solver

More from Math Homework Solver (15)

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
 
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
 
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
 
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
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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.
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Online Maths Assignment Help

  • 1. For Any Assignment 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. Problem 1 : Modified inner products for column vectors Consider the inner product (x, y) = x∗By from class (lecture 5.5 notes), where the vectors are in CN and B is an N × N Hermitian positive-definite matrix. (a) Show that this inner product satisfies the required properties of inner products from class: (x, y) = (y, x), (x, x) > 0 except for x = 0. (Linearity (x, αy+z) = α(x, y)+(x, z) is obvious from linearity the of matrix operations; you need not show it.) (b) If M is an arbitrary (possibly complex) N × N matrix, define the adjoint M† by (x, My) = (M† x, y) (for all x, y). (In this problem, we use † instead of ∗ for the adjoint in order to avoid confusion with the conjugate transpose: for this inner product, the adjoint MT is not the conjugate transpose M∗ = MT .) Give an explicit formula for M† in terms of M and B . (c) Using your formula from above, show that M† = M (i.e., M is self- adjoint/Hermitian for this inner product) if M = B−1A for some A = A∗ . Problem 2: Finite-difference approximations For this question you may find it helpful to refer to the notes and readings from lecture 3. Suppose that we want to compute the operation mathhomeworksolver.com
  • 3. for some smooth function c(x) (you can assume c has a convergent Taylor series everywhere). Now, we want to construct a finite-difference approximation for Aˆ with u(x) on Ω = [0, L] and Dirichlet boundary conditions u(0) = u(L) = 0, similar to class, approximating u(mΔx) ≈ um for M equally spaced points m = 1, 2, . . . , M, u0 = uM+1 = 0, and Δx = (a) Using center-difference operations, construct a finite-difference approximation for Au ˆ evaluated at mΔx. (Hint: use a centered first-derivative evaluated at grid points m + 0.5, as in class, followed by multiplication by c, followed by another centered first derivative. Do not ′ ′ ′′ separate Au ˆ by the product rule into c’ u’ + cu” first, as that will make the factorization in part (d) more difficult.) (b) Show that your finite-difference expressions correspond to approximating Au ˆ by Au where u is the column vector of the M points um and A is a real-symmetric matrix of the form A = −DTCD (give C, and show that D is the same as the 1st- derivative matrix from lecture). mathhomeworksolver.com
  • 4. (c) In Julia, the diagm(c) command will create a diagonal matrix from a vector c. The function diff1(M) = [ [1.0 zeros(1,M-1)]; diagm(ones(M-1),1) - eye(M) ] will allow you to create the (M + 1)×M matrix D from class via D = diff1(M) for any given value of M. Using these two commands, construct the matrix A from part (d) for M = 100 and L = 1 and c(x) = e3x via L = 1 M = 100 D = diff1(M) dx = L / (M+1) x = dx*0.5:dx:L # sequence of x values from 0.5*dx to <= L in steps of dx C = ....something from c(x)...hint: use diagm... A = -D’ * C * D / dx^2 You can now get the eigenvalues and eigenvectors by λ, U = eig(A), where λ is an array of eigenvalues and U is a matrix whose columns are the corresponding eigenvectors (notice that all the λ are < 0 since A is negative-definite). using PyPlot plot (dx:dx:L-dx, U[:,end-3:end]) xlabel("x"); ylabel("eigenfunctions") legend(["fourth", "third", "second", "first"]) mathhomeworksolver.com
  • 5. (ii) Verify that the first two eigenfunctions are indeed orthogonal with dot(U[:,end], U[:,end-1]) in Julia, which should be zero up to roundoff errors (iii) Verify that you are getting second-order convergence of the eigenvalues: compute the smallest-magnitude eigenvalue λM [end] for M = 100, 200, 400, 800 and check that the differences are decreasing by roughly a factor of 4 (i.e. |λ100 − λ200| should be about 4 times larger than |λ200 − λ400|, and so on), since doubling the resolution should multiply errors by 1/4. (d) For c(x) = 1, we saw in class that the eigenfunctions are sin(nπx/L). How do these compare to the eigenvectors you plotted in the previous part? Try changing c(x) to some other function (note: still needs to be real and > 0), and see how different you can make the eigenfunctions from sin(nπx/L). Is there some feature that always remains similar, no matter how much you change c? Problem 3: Discrete diffusion In this problem, you will examine thermal conduction in a system of a finite number N of pieces, and then take the N → ∞ limit to recover the heat equation. In particular: mathhomeworksolver.com
  • 6. • You have a metal bar of length L and cross-sectional area a (hence a volume La), with a varying temperature T along the rod. We conceptually subdivide the rod into N (touching) pieces of length Δx = L/N. • If Δx is small, we can approximate each piece as having a uniform temperature Tn within the piece (n = 1, 2, . . . , N), giving a vector T of N temperatures. • Suppose that the rate q (in units of W) at which heat flows across the boundary from piece n to piece n + 1 is given by q = where κ is the metal’s thermal conductivity (in units of W/m·K). That is, piece n loses energy at a rate q, and piece n + 1 gains energy at the same rate, and the heat flows faster across bigger areas, over shorter distances, or for larger temperature differences. Note that q > 0 if Tn > Tn+1 and q < 0 if Tn < Tn+1: heat flows from the hotter piece to the cooler piece. • If an amount of heat ΔQ (in J) flows into a piece, its temperature changes by ΔT = ΔQ/(cρaΔx), where c is the specific heat capacity (in J/kg·K) and ρ is the density (kg/m3) of the metal. • The rod is insulated: no heat flows out the sides or through the ends. Given these assumptions, you should be able to answer the following: mathhomeworksolver.com
  • 7. (a) “Newton’s law of cooling” says that that the temperature of an object changes at a rate (K/s) proportional to the temperature difference with its surroundings. Derive the equivalent here: show that our assumptions above imply that for some constant α, for 1 < n < N. Also give the (slightly different) equations for n = 1 and n = N. (b) Write your equation from the previous part in matrix form: for some matrix A. (c) Let T (x, t) be the temperature along the rod, and suppose Tn(t) = T ([n − 0.5]Δx, t) (the temperature at the center of the n-th piece). Take the limit N → ∞ (with L fixed, so that and derive a partial differential equation What is Aˆ? (Don’t worry about the x = 0, L ends until the next part.) (d) What are the boundary conditions on T (x, t) at x = 0 and L? Check that if you go backwards, and form a center-difference approximation of Aˆ with these boundary conditions, that you recover the matrix A from above. (e) How does your Aˆ change in the N → ∞ limit if the conductivity is a function κ(x) of x? mathhomeworksolver.com
  • 8. (f) Suppose that instead of a thin metal bar (1d), you have an L × L thin metal plate (2d), with a temperature T (x, y, t) and a constant conductivity κ. If you go through the steps above dividing it into N × N little squares of size Δx × Δy, what PDE do you get for T in the limit N → ∞? (Many of the steps should be similar to above.) mathhomeworksolver.com
  • 9. Problem 1 (a) We have (x, x) = x∗Bx > 0 for x = 0 by definition of positive-definiteness. We have (x, y) = ∗ ∗ x∗By = (B∗x) y = (Bx) y = y∗(Bx) = (y, x) by B = B∗. (b) (x, My) = x∗BMy = (M†x, y) = x∗M†∗By for all x, y, and hence we must have BM = M†∗B ∗ , or M†∗ = BMB−1 =⇒ M† = (BMB−1) = (B−1)∗M∗B∗ . Using the fact that (c) If M = B−1A where A = A∗, then M† = B−1AB−1B = B−1A = M. Q.E.D. Problem 2: (a) As in class, let u' ([m + 0.5]Δx) ≈ u’m+0.5 = Define cm+0.5 = c([m + 0.5]Δx). Now we want to take the derivative of in order to approximate Au at m by a center .5 difference: There are other ways to solve this problem of course, that are also second-order accurate. mathhomeworksolver.com
  • 10. (b) In order to approximate Au, we did three things: compute u' by a center-difference as in class, multiply by cm+0.5 at each point m + 0.5, then compute the derivative by another center-difference. The first and last steps are exactly the same center- difference steps as in class, so they correspond as in class to multiplying by D and −DT , respectively, where D is the (M + 1) × M matrix The middle step, multiplying the (M + 1)-component vector u' by cm+0.5 at each point is just multiplication by a diagonal (M + 1) × (M + 1) matrix mathhomeworksolver.com
  • 11. Putting these steps together in sequence, from right to left, means that A = −DT CD (c) In Julia, the diagm(c) command will create a diagonal matrix from a vector c. The function diff1(M) = [ [1.0 zeros(1,M-1)]; diagm(ones(M-1),1) - eye(M) ] will allow you to create the (M + 1) × M matrix D from class via D = diff1(M) for any given value of M. Using these two commands, we construct the matrix A from part (d) for M = 100 3x and L = 1 and c(x) = e3x via L=1 M = 100 D = diff1(M) mathhomeworksolver.com
  • 12. dx = L / (M+1) x = dx*0.5:dx:L # sequence of x values from 0.5*dx to <= L in steps of dx c(x) = exp(3x) C = diagm(c(x)) A = -D’ *C*D / dx^2 You can now get the eigenvalues and eigenvectors by λ, U = eig(A), where λ is an array of eigenvalues and U is a matrix whose columns are the corresponding eigenvectors (notice that all the λ are < 0 since A is negative-definite). (i) The plot is shown in Figure 1. The eigenfunctions look vaguely “sine-like”—they have the same number of oscillations as sin(nπx/L) for n = 1, 2, 3, 4—but are “squeezed” to the left-hand side. (ii) We find that the dot product is ≈ 4.3 × 10−16, which is zero up to roundoff errors (your exact value may differ, but should be of the same order of magnitude). (iii) In the posted IJulia notebook for the solutions, we show a plot of |λ2M −λM| as a function of M on a log–log scale, and verify that it indeed decreases ∼ 1/M2. mathhomeworksolver.com
  • 13. You can also just look at the numbers instead of plotting, and we find that this difference decreases by a factor of ≈ 3.95 from M = 100 to M = 200 and by a factor of ≈ 3.98 from M = 200 to M = 400, almost exactly the expected factor of 4. (For fun, in the solutions I went to M = 1600, but you only needed to go to M = 800.) (d) In general, the eigenfunctions have the same number of nodes (sign oscillations) as sin(nπx/L), but the oscillations pushed towards the region of high c(x). This is even more dramatic if we increase the c(x) contrast. In Figure xxx, we show two examples. First, c(x) = e20x, in which all of the functions are squished to the left where c is small. Second c(x)=1 for x < 0.3 and 100 otherwise—in this case, the oscillations are at the left 1/3 where c is small, but the function is not zero in the right 2/3. Instead, the function is nearly constant where c is large. The reason for this has to do with the continuity of u: it is easy to see from the operator that ' ' )' ' cu must be continuous for (cu to exist, and hence the slope u must decrease by a factor of mathhomeworksolver.com
  • 14. Figure 2: First four eigenfunctions of Au = (cu for two different choices of c(x). mathhomeworksolver.com
  • 15. 100 for x > 0.3, leading to a u that is nearly constant. (We will explore some of these issues further later in the semester.) Problem 3: (a) The heat capacity equation tells us that where dQn/dt is the rate of change of the heat in the n-th piece. The thermal conductivity equation tells us that dQn/dt, in turn, is equal to the sum of the rates q at which heat flows from n + 1 and n − 1 into n: where The only difference for T1 and TN is that they have no heat flow n − 1 and n + 1, respectively, since the ends are insulated: α(TN−1 − TN ). (b) We can obtain A in two ways. First, we can simply look directly at our equations above, Which give corresponding rows of the matrix mathhomeworksolver.com
  • 16. Alternatively, we can write each of the above steps—differentiating T to get the rate of heat flow q to the left at each of the N −1 interfaces between the pieces, then taking the difference of the q’s to get dT /dt, in matrix form, to write: in terms of the D matrix from class (except with N reduced by 1), which gives the same A as above. As we will see in the parts below, this is indeed a second-derivative approximation, but with different boundary conditions—Neumann conditions—than the Dirichlet conditions in class. mathhomeworksolver.com
  • 17. By the way, it is interesting to consider −DDT , compared to the −DT D we had in class. Clearly, −DDT is real-symmetric and negative semidefinite. It is not, however, negative definite, since DT does not (and cannot) have full column rank (its rank must be ≤ the number of rows N − 1, and in fact in class we showed that it has rank N − 1). (c) Ignoring the ends for the moment, for all the interior points we have which is exactly our familiar center-difference approximation for at the point n (x = [n − 0.5]Δx). Hence, everywhere in the interior our equations converge to and thus (d) The boundary conditions are The easiest way to see this is to observe that our heat flow q is really a first derivative, and zero heat flow at the ends Means zero derivatives. That is, qn+0.5 = is really an approximate derivative: qN+0.5 to/from n = 0 and n = N + 1 is zero, and hence q0.5 = qN+0.5 = 0 ≈ while the flows q0.5 and mathhomeworksolver.com
  • 18. Working backwards, consider (setting 1 for convenience) with these boundary conditions and center-difference approximations. We are given Tn = T([n − 0.5]Δx,t) for n = 1,...,N. First, we compute for n = 1,...,N − 1 (−DT T using the D above). Unlike the Dirichlet case in class, we don’t com which are zero by the boundary conditions. Then, we compute our approximate 2nd derivatives for n = 1,...,N, where we let using the D from above). This gives at the endpoints, and for 1 <n<N, which are precisely the rows of our A matrix above. (e) If κ(x), then we get a different κ and α factor for each Tn+1 − Tn difference: mathhomeworksolver.com
  • 19. Where In the N → ∞ limit, this gives by κ, differentiated again, and then divided by cρ. (You weren’t asked to handle the case where cρ is not a constant, so it’s okay if you commuted cρ with the derivatives.) (f) If we discretize to Tm,n = T(mΔx, nΔy), the steps are basically the same except that we have to consider the heat flow in both the x and y directions, and hence we have to take differences in both x and y. In particular, suppose the thickness of the block is h. In this case, heat will flow from Tm,n to Tm+1,n at a rate we differentiated, multiplied where hΔy is the area of the interface between the two blocks. Then, to convert into a rate of temperature change, we will divide by cρhΔxΔy, where hΔxΔy is the volume of the block. Putting this all together, we obtain: mathhomeworksolver.com
  • 20. where the thing in [··· ] is precisely the five-point stencil approximation for ∇2 from class. Hence, we obtain where for fun I have put the κ in the middle, which is the right place if κ is not a constant (you were not required to do this). mathhomeworksolver.com