## 数学代写|微分方程代写differential equation代考|МАTH2921

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Growth with a Carrying Capacity—Fisher’s Equation

Now we consider a diffusing and reproducing population for which there is population size-dependent death. We can represent this by the two reactions
$$U \stackrel{\alpha}{\longrightarrow} 2 U, \quad U+U \stackrel{\beta}{\longrightarrow} U .$$
For these reactions, the conservation equation is
$$\frac{\partial u}{\partial t}=D \frac{\partial^{2} u}{\partial x^{2}}+\alpha u-\beta u^{2} .$$
It is common to write this equation in the slightly different form
$$\frac{\partial u}{\partial t}=D \frac{\partial^{2} u}{\partial x^{2}}+\alpha u\left(1-\frac{u}{K}\right),$$
where $K=\frac{\alpha}{\beta}$ is called the carrying capacity. Rescaling the variables by setting $u=$ $\frac{\alpha}{\beta} v=K v, t=\frac{\tau}{\alpha}$, and $x=\sqrt{\frac{D}{\alpha}} \xi$, the equation simplifies to
$$\frac{\partial v}{\partial \tau}=\frac{\partial^{2} v}{\partial \xi^{2}}+v-v^{2}$$
with no free parameters.
A second derivation of this equation is related to SIR epidemic models. Here we suppose that there are two populations, denoted by $S$ and $I$, representing susceptible and infected populations, respectively. A susceptible individual can become infected by contact with another infected individual, but there is no possible recovery from the infection; an infected individual is permanently contagious. This process can be represented by the reaction
$$S+I \stackrel{\alpha}{\longrightarrow} 2 I$$ and the conservation equations for these two populations are
$$\frac{\partial s}{\partial t}=D_{s} \frac{\partial^{2} s}{\partial x^{2}}-\alpha s i, \quad \frac{\partial i}{\partial t}=D_{i} \frac{\partial^{2} i}{\partial x^{2}}+\alpha s i .$$
Under the assumption that the diffusion coefficient for both populations is the same, $D_{s}=D_{i}$, the quantity $s+i$ satisfies the diffusion equation and so has steady, constant solutions $s+i=S_{0}$. With this conserved quantity, the equation for $i$ becomes
$$\frac{\partial i}{\partial t}=D_{i} \frac{\partial^{2} i}{\partial x^{2}}+\alpha i\left(S_{0}-i\right)$$
Rescaling the variables by setting $i=S_{0} v, t=\frac{\tau}{\alpha S_{0}}, x=\sqrt{\frac{D_{i}}{\alpha S_{0}}} \xi$, the equation simplifies to $(6.30)$.

## 数学代写|微分方程代写differential equation代考|Resource Consumption

Now consider the situation in which organisms, say bacteria, consume a resource substrate, such as glucose, of which there is a finite supply. For example, suppose bacteria are grown on an agar gel on a Petrie dish. The reaction describing this is
$$U+S \stackrel{\alpha}{\longrightarrow} 2 U .$$
The units on $U$ and $S$ are such that one unit of $S$ converts into one unit of $U$. We assume that both the glucose and the bacteria move by diffusion. Consequently, the differential equations describing this evolution (in one spatial dimension) are
\begin{aligned} &\frac{\partial u}{\partial t}=D_{u} \frac{\partial^{2} u}{\partial x^{2}}+\alpha u s \ &\frac{\partial s}{\partial t}=D_{g} \frac{\partial^{2} s}{\partial x^{2}}-\alpha u s \end{aligned}
where $s$ represents the concentration of the resource substrate (i.e., the glucose). Numerical simulation of this system of equations is shown in Figure 6.13. The Matlab code for this simulation is titled CN_diffusion_gluc_micro_X.m. This simulation again suggests that there should be a traveling wave solution. The first step of the analysis is to simplify the equations by introducing scaled variables $t=\frac{\tau}{\alpha}, x=\sqrt{\frac{D_{u}}{\alpha}} \xi$, in terms of which the equations become
\begin{aligned} &\frac{\partial u}{\partial \tau}=\frac{\partial^{2} u}{\partial \xi^{2}}+u s \ &\frac{\partial s}{\partial \tau}=\delta \frac{\partial^{2} s}{\partial \xi^{2}}-u s \end{aligned}
where $\delta=\frac{D_{g}}{D_{u}}$.
Now, to examine the possibility of traveling wave solutions, we look for a solution of the form $u(\xi, \tau)=U(\xi-c \tau), s(\xi, \tau)=S(\xi-c \tau)$, and find the system of ordinary differential equations
\begin{aligned} 0 &=\frac{d^{2} U}{d \zeta^{2}}+c \frac{d U}{d \zeta}+U S \ 0 &=\delta \frac{d^{2} S}{d \zeta^{2}}+c \frac{d S}{d \zeta}-U S \end{aligned}

## 数学代写|微分方程代写differential equation代考|Spread of Rabies—SIR with Diffusion

It has been observed in England that rabid foxes tend to travel across much larger distances than rabies free animals. This observation has led to consideration of the spread of an infectious disease where the infected animals diffuse, but susceptible animals do not [51]. For this we consider the standard SIR disease dynamics
$$S+I \stackrel{\alpha}{\longrightarrow} 2 I, \quad I \stackrel{\beta}{\longrightarrow} R,$$
where $S$ represents the susceptible population, $I$ represents the infected population, and $R$ represents the recovered (or removed) population. The corresponding differential equations are
\begin{aligned} &\frac{\partial s}{\partial t}=-\alpha s i \ &\frac{\partial i}{\partial t}=\alpha s i-\beta i+D \frac{\partial^{2} i}{\partial x^{2}} . \end{aligned}
Introducing dimensionless variables $\sigma=\frac{s}{S_{0}}, u=\frac{i}{S_{0}}, t=\frac{\tau}{\alpha S_{0}}$, and $x=\sqrt{\frac{D}{\alpha S_{0}}} \xi$, we find the dimensionless equations
\begin{aligned} &\frac{\partial \sigma}{\partial \tau}=-\sigma u, \ &\frac{\partial u}{\partial \tau}=\sigma u-\eta u+\frac{\partial^{2} u}{\partial \xi^{2}}, \end{aligned}
depending on the single parameter $\eta=\frac{\beta}{\alpha S_{0}}=\frac{1}{R_{0}}$. A simulation of these equations is shown in Figure 6.15, and was computed using the Matlab code $\mathrm{CN}_{\text {_diffusion_SIR.m. }}$
As you can see from this figure, an initial amount of $u$ grows and spreads as a traveling wave, leading to a permanent decrease in the amount of $\sigma$, while the spreading bulge of $u$ is only temporary, as recovery eventually restores $u$ to zero. We would like to determine how fast this infection spreads and how much of the initial susceptible population is affected by it.

## 数学代写|微分方程代写differential equation代考|Growth with a Carrying Capacity—Fisher’s Equation

∂在∂吨=D∂2在∂X2+一个在−b在2.

∂在∂吨=D∂2在∂X2+一个在(1−在ķ),

∂在∂τ=∂2在∂X2+在−在2

∂s∂吨=Ds∂2s∂X2−一个s一世,∂一世∂吨=D一世∂2一世∂X2+一个s一世.

∂一世∂吨=D一世∂2一世∂X2+一个一世(小号0−一世)

## 数学代写|微分方程代写differential equation代考|Resource Consumption

∂在∂吨=D在∂2在∂X2+一个在s ∂s∂吨=DG∂2s∂X2−一个在s

∂在∂τ=∂2在∂X2+在s ∂s∂τ=d∂2s∂X2−在s

0=d2在dG2+Cd在dG+在小号 0=dd2小号dG2+Cd小号dG−在小号

## 数学代写|微分方程代写differential equation代考|Spread of Rabies—SIR with Diffusion

∂s∂吨=−一个s一世 ∂一世∂吨=一个s一世−b一世+D∂2一世∂X2.

∂σ∂τ=−σ在, ∂在∂τ=σ在−这在+∂2在∂X2,

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MATH2021

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Numerical Methods

The first method to numerically simulate the diffusion equation is one that we have already used, namely the method of lines. With this method, we discretize the spatial region into a grid with points at $x_{j}=j \Delta x$, $j=0,1, \ldots, N$, and then write the diffusion equation approximately as the system of ordinary differential equations
$$\frac{d u_{j}}{d t}=\frac{D}{\Delta x^{2}}\left(u_{j+1}-2 u_{j}+u_{j-1}\right) .$$
At the endpoints, take the equations to be
$$\frac{d u_{0}}{d t}=\frac{2 D}{\Delta x^{2}}\left(u_{1}-u_{0}\right), \quad \frac{d u_{N}}{d t}=\frac{2 D}{\Delta x^{2}}\left(u_{j-1}-u_{N}\right) .$$
This choice follows from the approximation to the derivative of $u,\left.\frac{\partial u}{\partial x}\right|{x=j \Delta x} \approx \frac{u{j+1}-u_{j-1}}{2 \Delta x}$, so at the boundaries the zero derivative (Neumann) boundary condition implies that $u_{-1}=u_{1}$, and $u_{N+1}=u_{N-1}$. (The points at $j=-1$ and $j=N+1$ are called ghost points and are useful for this calculation, but are never actually computed.)

This system of equations is then simulated using a numerical ordinary differential equation solver. The Matlab code for this for Neumann or Robin boundary conditions is titled Diffusion_NK_via_MUL.m and for Dirichlet boundary conditions is titled Diffusion_Dirichlet_via_MOL.m.

It is convenient for future discussions to represent $u(j \Delta x, t)$ as a vector $\mathbf{u}(t)=\left(u_{j}\right)$, and then to rewrite (5.37) using vector/matrix notation as
$$\frac{d \mathbf{u}}{d t}=\frac{D}{\Delta x^{2}} A \mathbf{u}$$
where the matrix $A$ has diagonal elements $-2$, and first upper and lower off-diagonal elements 1 , except the first element of the upper diagonal and last element of the lower diagonal are both 2, i.e.,
$$A=\left(\begin{array}{ccccc} -2 & 2 & 0 & \cdots & 0 \ 1 & -2 & 1 & 0 & \cdots \ & & \vdots & & \ 0 & \cdots & 1 & -2 & 1 \ 0 & \cdots & 0 & 2 & -2 \end{array}\right)$$

## 数学代写|微分方程代写differential equation代考|Other Boundary Conditions

Everything discussed in the previous section was for Neumann boundary conditions. However, the only difference for the numerical methods with different boundary conditions is with the definition of the corner entries of the matrix $A$. For homogeneous Robin boundary conditions (5.23), we write the approximations
$$D\left(\frac{u_{1}-u_{-1}}{2 \Delta x}\right)=\delta u_{0}, \quad-D\left(\frac{u_{N+1}-u_{N-1}}{2 \Delta x}\right)=\delta u_{N}$$
which when substituted into the finite difference approximation of the diffusion equation (5.37) yields
$$\frac{d u_{0}}{d t}=\frac{D}{\Delta x^{2}}\left(2 u_{1}-2\left(1+\frac{\delta \Delta x}{D}\right) u_{0}\right)$$
$$\frac{d u_{N}}{d t}=\frac{D}{\Delta x^{2}}\left(2\left(-1-\frac{\delta \Delta x}{D}\right) u_{N}+2 u_{N-1}\right) .$$
This implies that the matrix $A$ in (5.40) needs to be modified slightly to have first and last diagonal elements
$$A_{1,1}=-2-2 \frac{\delta \Delta x}{D}, \quad A_{N+1, N+1}=-2-2 \frac{\delta \Delta x}{D}$$
For homogeneous Dirichlet boundary conditions, the unknown variables are $u_{j}$, $j=1,2, \ldots, u_{N-1}$, (two less than for Neumann and Robin conditions) and the finite difference approximation (5.37) for $u_{1}$ and $u_{N ~}$
$$\text { (5.56) } \frac{d u_{1}}{d t}=\frac{D}{\Delta x^{2}}\left(u_{2}-2 u_{1}\right), \quad \frac{d u_{N-1}}{d t}=\frac{D}{\Delta x^{2}}\left(-2 u_{N-1}+u_{N-2}\right)$$
(since $u_{0}=u_{N}=0$ ) and consequently, the matrix $A$ (which is now an $N-1 \times N-1$ matrix) is
$$A=\left(\begin{array}{ccccc} -2 & 1 & 0 & \cdots & 0 \ 1 & -2 & 1 & 0 & \cdots \ & & \vdots & & \ 0 & \cdots & 1 & -2 & 1 \ 0 & \cdots & 0 & 1 & -2 \end{array}\right)$$
For Dirichlet boundary conditions, the Matlab codes are FEuler_diffusion_dirichlet.m, BEuler_diffusion_Dirichlet.m, and CN_diffusion_Dirichlet.m for forward Euler, backward Euler, and Crank-Nicolson methods, respectively.

## 数学代写|微分方程代写differential equation代考|Birth-Death with Diffusion

Suppose that there is some population or chemical species $U$ that diffuses on an infinite domain and experiences either decay, as in
$$U \stackrel{\alpha}{\longrightarrow} \emptyset,$$
or birth via asexual duplication as in
$$U \stackrel{\alpha}{\longrightarrow} 2 U$$
Setting $u=[U]$, the equation describing the evolution of this population is
$$\frac{\partial u}{\partial t}=D \frac{\partial^{2} u}{\partial x^{2}}+\sigma \alpha u,$$
where $\alpha>0, \sigma=-1$ for decay, and $\sigma=1$ for growth.
As an example, suppose that signaling molecules are produced at some point, and that the target of the signal is some distance away. Specifically, many copies of a transcription factor may be made when only one is needed to activate transcription of a gene. What percentage, if any, of the signaling molecules reach the target before they degrade? Roughly $10^{8}$ sperm cells are initially released to reach the oocyte in human fertilization when only one is required. What are the consequences of releasing fewer sperm cells? This could also be a model to determine the distribution of seeds falling

to the ground after release from a seed pod into the air. This seed dispersal problem is discussed more in Chapter $13 .$

Let’s begin our study of this problem of diffusion with decay with a stochastic simulation. To do this, we modify the algorithm from Chapter 4 that simulates diffusing particles to account for the possibility of degradation. At each time step, the particle can move or degrade, and if it degrades, its motion is terminated. The Matlab code to implement this is titled decay_probability.m, and the result of a simulation is shown in Figure 6.1. What we see in this figure may be a bit surprising; the distribution of decay position is clearly not a Gaussian distribution. But what is it?

## 数学代写|微分方程代写differential equation代考|Numerical Methods

d在jd吨=DΔX2(在j+1−2在j+在j−1).

d在0d吨=2DΔX2(在1−在0),d在ñd吨=2DΔX2(在j−1−在ñ).

d在d吨=DΔX2一个在

## 数学代写|微分方程代写differential equation代考|Other Boundary Conditions

D(在1−在−12ΔX)=d在0,−D(在ñ+1−在ñ−12ΔX)=d在ñ

d在0d吨=DΔX2(2在1−2(1+dΔXD)在0)

d在ñd吨=DΔX2(2(−1−dΔXD)在ñ+2在ñ−1).

(5.56) d在1d吨=DΔX2(在2−2在1),d在ñ−1d吨=DΔX2(−2在ñ−1+在ñ−2)
（自从在0=在ñ=0)，因此，矩阵一个（现在是一个ñ−1×ñ−1矩阵）是

## 数学代写|微分方程代写differential equation代考|Birth-Death with Diffusion

∂在∂吨=D∂2在∂X2+σ一个在,

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MAT3105

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|With Boundary Conditions

Up to this point we have not discussed much about boundary conditions, but these can be avoided no longer. As the name implies, a boundary condition is a condition on the solution at the boundary of the domain of interest. In general, one needs one condition for every derivative that appears in the equation. Thus, for example, for a differential equation that describes the time evolution of some object with an equation of the form $u_{t}=f(u, t)$, one needs one initial condition to specify $u\left(t_{0}\right)$, where $t_{0}$ is the start time. On the other hand for a differential equation that can be written as $u_{x x}=g\left(u, u_{x}, x\right)$, one needs two conditions at the boundaries in order to specify $u$ completely. Thus, for the diffusion equation on a finite domain, one needs to specify an initial condition at $t=0$ for all values of $x$ in the domain, and two boundary conditions at the ends of the spatial domain. For a one dimensional spatial domain there are four possibilities:

• Dirichlet condition is when the value of the unknown $u$ is specified at the boundary. If $u$ is a probability, the condition $u=0$ is said to be an absorbing boundary condition, because a particle that crosses the boundary disappears and cannot re-enter the domain.
• Neumann condition is when the flux of the unknown $u$ across the boundary is specified. In a biological context, the flux across a boundary is zero if the boundary is impermeable to the particles, and is often called a no-flux condition. If $u$ is a probability, $\nabla u \cdot \mathbf{n}=0$ is called a reflecting boundary condition.
• Robin condition is a weighted combination of Dirichlet and Neumann boundary conditions, typically of the form $D \nabla u \cdot \mathbf{n}+a u=b$ and is often appropriate when the diffusing species can undergo a chemical reaction at the boundary, or, as we see below, when the species can diffuse across a porous boundary.
• Periodic conditions apply when the one dimensional domain is actually a closed loop of length $L$, with the point at $x=0$ the same as the point at $x=L$. In this case, one requires that the function $u$ and its derivative be continuous at the “boundary”.

Before we move on to solve the diffusion equation with different boundary conditions, it is worthwhile to gain some exposure to these by examining what happens when a diffusion process is at steady state. Steady state means that $u$ is not changing in time, i.e., $\frac{\partial u}{\partial t}=0$, so that the process is in equilibrium, but it does not mean that nothing is happening.

To illustrate, suppose $u$ is held fixed at $u=u_{0}$ at $x=0$ and $u=u_{L}$ at $x=L$. Then, the steady state solution satisfies $u_{x x}=0$, which implies that $u$ is a linear function satisfying the boundary conditions, i.e.,
$$u(x)=u_{L} \frac{x}{L}+u_{0}\left(1-\frac{x}{L}\right) .$$
To verify that something is happening, notice that the flux is
$$J=-D u_{x}=\frac{D}{L}\left(u_{0}-u_{L}\right),$$
which is not zero, unless $u_{L}=u_{0}$.

Suppose, instead, that the boundaries at $x=0$ and $x=L$ are porous membranes, with $u=u_{0}$ and $u=u_{L}$ just outside the domain, and the species $u$ can diffuse through the boundaries and therefore must satisfy the Robin boundary conditions
$$\left.D u_{x}\right|{x=0}=\delta\left(u(0)-u{0}\right), \quad-\left.D u_{x}\right|{x=L}=\delta\left(u(L)-u{L}\right) .$$
where $\delta>0$ represents the porosity of the boundary membrane, and $u(0), u(L)$ are the values of $u$ at the membrane just inside the domain. Notice what these conditions mean in words: the term $\delta\left(u(0)-u_{0}\right)$ is the diffusive flux of u across the membrane to the outside, and $\left.D u_{x}\right|{x=0}$ is the flux of $u$ out of the domain at $x=0$. Clearly these must match. Notice also the difference in the sign for these two conditions. This is because if $u(0)>u{0}$, the flux will be out of the domain to the left, i.e., negative (and because flux is the negative spatial derivative of $u, u$ must therefore have positive slope). If $u(L)>u_{L}$, the flux will be out of the domain to the right, i.e., positive (hence $u$ must have a negative slope). As before, $u$ is a linear function in the interior of the domain, and the requirement that it satisfy the two Robin boundary conditions yields that
$$u(x)=\frac{1}{1+2 \Delta}\left(u_{L}-u_{0}\right) \frac{x}{L}+\frac{\Delta\left(u_{0}+u_{L}\right)+u_{0}}{1+2 \Delta}$$
where $\Delta=\frac{D}{\delta L}$. Once again, the flux is nontrivial, being
$$J=-D u_{x}=\frac{D}{1+2 \Delta} \frac{u_{0}-u_{L}}{L} .$$
The quantity $D_{\text {eff }}=\frac{D}{1+2 \Delta}$ is the effective diffusion coefficient for this membrane bound medium, since the species must diffuse across both membranes and well as through the interior of the medium. Notice also the identity
$$\frac{L}{D_{\text {eff }}}=\frac{1}{\delta}+\frac{L}{D}+\frac{1}{\delta}$$
(What do you suspect the answer is if the two porosities are different? Can you verify this suspicion? See Exercise 5.5.) Clearly, in the limit that the porosity of the membrane $\delta \rightarrow \infty$, the problem reduces to the Dirichlet boundary condition with solution (5.22) (see Figure 5.2).

## 数学代写|微分方程代写differential equation代考|Separation of Variables

In biological applications, the most common boundary condition is the no-flux (homogeneous Neumann) condition, when particles are trapped inside a bounded domain, and this is where we begin our study of time dependent solutions of the diffusion equation on a bounded domain.

An important feature of the no-flux boundary condition is that the total amount of the quantity $u$ is conserved; this follows immediately from the conservation law as stated in (2.1). When solving any differential equation (in time) with constant coefficients, it is reasonable to try a solution that is exponential in time. For the diffusion

equation, we try a solution of the form
$$u(x, t)=U(x) \exp (\lambda t),$$
and upon substituting into the diffusion equation (3.2), we find
$$D \frac{d^{2} U}{d x^{2}}-\lambda U=0 .$$
This equation must be solved subject to the no-flux boundary condition $U^{\prime}(0)=$ $U^{\prime}(L)=0 .$

There are an infinite number of possible solutions, but they are all of the same form, namely
$$U_{n}(x)=a_{n} \cos \left(\frac{n \pi x}{L}\right),$$
with the important restriction that
$$\lambda=\lambda_{n} \equiv-\frac{n^{2} \pi^{2} D}{L^{2}},$$
with $n=0,1,2, \ldots$
Since there are an infinite number of possible solutions, and the diffusion equation is linear, the fully general solution is an arbitrary linear combination of the possible solutions, namely
$$u(x, t)=\sum_{n=0}^{\infty} a_{n} \exp \left(-\frac{D n^{2} \pi^{2} t}{L^{2}}\right) \cos \left(\frac{n \pi x}{L}\right)$$

## 数学代写|微分方程代写differential equation代考|With Boundary Conditions

• 狄利克雷条件是当未知值在在边界处指定。如果在是概率，条件在=0被称为吸收边界条件，因为穿过边界的粒子消失并且不能重新进入域。
• 诺伊曼条件是当未知的通量在指定跨界。在生物学背景下，如果边界对粒子是不可渗透的，则跨边界的通量为零，并且通常称为无通量条件。如果在是概率，∇在⋅n=0称为反射边界条件。
• Robin 条件是 Dirichlet 和 Neumann 边界条件的加权组合，通常形式为D∇在⋅n+一个在=b当扩散物质可以在边界发生化学反应时，或者正如我们在下面看到的，当物质可以扩散穿过多孔边界时，通常是合适的。
• 当一维域实际上是一个长度的闭环时，周期性条件适用大号, 点在X=0与点相同X=大号. 在这种情况下，需要函数在并且它的导数在“边界”处是连续的。

Ĵ=−D在X=D大号(在0−在大号),

D在X|X=0=d(在(0)−在0),−D在X|X=大号=d(在(大号)−在大号).

Ĵ=−D在X=D1+2Δ在0−在大号大号.

（如果两个孔隙率不同，你怀疑答案是什么？你能证实这个怀疑吗？见习题 5.5。）显然，在膜孔隙率的极限内d→∞，问题归结为狄利克雷边界条件，解为 (5.22)（见图 5.2）。

## 数学代写|微分方程代写differential equation代考|Separation of Variables

Dd2在dX2−λ在=0.

λ=λn≡−n2圆周率2D大号2,

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MATH4403

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|An Agent-Based Approach

A popular way to simulate a population of particles is with an agent-based (or individual-based) approach, in which particles are tracked separately, but simultaneously.

Suppose, for example, we want to simulate a population (say, several hundred) of one dimensional run and tumble organisms. In the last section, we followed the motion of individuals one at a time, using a next reaction time algorithm to determine changes of state and position. This will not work for following several particles at once, since the transitions and movement are not synchronous.

So how does an agent-based approach work? We suppose that there are $N$ particles with position $x_{n}, n=1,2, \ldots, N$, each in state $s_{n}, n=1,2, \ldots, N$, where $s_{j}$ is one of the $K$ possible states $1,2, \ldots, K$. Now, there are rules for how a particle in state $k$ moves, say, with velocity $v(k)=v_{k}$, and there are rates for transitioning between states, say $\lambda_{j k}$ is the rate of transitioning from state $k$ to state $j$. We discretize time with a fixed time step $\Delta t$, and with each time step, let $\lambda_{j k} \Delta t$ be the probability of changing from the state $k$ to state $j$. The algorithm proceeds by first moving each particle by the amount $v\left(s_{n}\right) \Delta t$ and then modifying the states based on the probabilities $\lambda_{j k} \Delta t$ and $N$ uniformly distributed random numbers $R_{n}$.

To be specific, for the one dimensional run and tumble model, there are three states, say, $s={1,2,3}$ corresponding to leftward, resting, and rightward motion. The velocities in these three states are $-v, 0, v$, respectively. The rates of transition are $\lambda_{21}=\lambda_{23}=k_{\text {off }}$ and $\lambda_{12}=\lambda_{32}=\frac{k_{\text {on }}}{2}$.

The Matlab code that simulates this agent-based particle movement for run and tumble particles in one dimension is titled agent_based_run_and_tumble.m.

A reason that agent-based modeling is both useful and popular is that the rules for movement and change of state can be diverse and can be easily simulated, even though a partial differential equation description of the dynamics may not be known. We use agent-based modeling throughout this book, especially in Chapter 14 on Collective Behavior, where we discuss swarming behaviors of things like flying birds.

## 数学代写|微分方程代写differential equation代考|On an Infinite Domain

If the domain is the infinite line, and the initial data are concentrated at the origin, a solution is the normal distribution $\mathcal{N}(0,2 D t)$, found in Chapter 3 and given by
$$u(x, t)=\frac{1}{\sqrt{4 \pi D t}} \exp \left(-\frac{x^{2}}{4 D t}\right)$$
If the domain is the two dimensional plane, we look for radially symmetric solutions, and therefore need a solution of the equation
$$\frac{\partial u}{\partial t}=\frac{D}{r} \frac{\partial}{\partial r}\left(r \frac{\partial u}{\partial r}\right),$$
where $r$ is the radius. We guess a solution of the form
$$u(r, t)=\frac{1}{a(t)} \exp \left(\frac{-r^{2}}{b(t)}\right),$$
and find it must be that
$$a\left(\frac{d b}{d t}-4 D\right) r^{2}+4 a b D-b^{2} \frac{d a}{d t}=0$$
for all $r$. This is a quadratic polynomial in $r$ which can be identically zero for all $r$ only if the individual coefficients of powers of $r$ are zero, or, that
$$\frac{d b}{d t}=4 D, \quad \frac{d a}{d t}=4 D \frac{a}{b}$$

so that $b(t)=4 D t, a(t)=a_{0} t$. Consequently, the solution is
$$u(r, t)=\frac{1}{4 \pi D t} \exp \left(\frac{-r^{2}}{4 D t}\right),$$
and this solution has the property
$$2 \pi \int_{0}^{\infty} u(r, t) r d r=1$$
for all time. Furthermore, the percentage of the population contained within a circle of radius $R$ is given by
$$2 \pi \int_{0}^{R} u(r, t) r d r=\int_{0}^{R} \frac{1}{2 D t} \exp \left(\frac{-r^{2}}{4 D t}\right) r d r=1-\exp \left(\frac{-R^{2}}{4 D t}\right)$$
confirming what we observed in the particle diffusion simulation in the last chapter. (See Figures $4.5$ and 4.6.)

## 数学代写|微分方程代写differential equation代考|On the Semi-infinite Line

Suppose that a long capillary, open at one end, with uniform cross-sectional area $A$ and filled with water, is inserted into a solution of known chemical concentration $u_{0}$, and the chemical species is free to diffuse into the capillary through the open end. Since the concentration of the chemical species depends only on the distance along the tube and time, it is governed by the diffusion equation (3.2), and for convenience we assume that the capillary is infinitely long, so that $0<x<\infty$. Because the solute bath in which the capillary sits is large, it is reasonable to assume that the chemical concentration at the tip is fixed at $u(0, t)=u_{0}$, and since the tube is initially filled with pure water, $u(x, 0)=0$ for all $x, 0<x<\infty$.

There are (at least) two ways to find the solution of this problem. One is to use the Fourier-Sine transform, a technique which is beyond the scope of this text (but you can learn about it in [34]). The second is to make a lucky (or semi-informed) guess. Here, we make the guess that the solution should be of the form $u(x, t)=f(\xi)$, where $\xi=\frac{x}{\sqrt{2 D t}}$. Substitute this guess into the diffusion equation and find
$$f^{\prime} \xi+f^{\prime}=0 .$$
This is a separable equation for $f^{\prime}$ and can be written as
$$\frac{d f^{\prime}}{f^{\prime}}=-\xi d \xi$$
so that
$$\frac{d f}{d \xi}=a \exp \left(-\frac{\xi^{2}}{2}\right)$$
where $a$ is a yet to be determined constant. From this we determine that a solution of the diffusion equation is given by
$$u(x, t)=b+a \int_{0}^{z} \exp \left(-\frac{s^{2}}{2}\right) d s, \quad z=\frac{x}{\sqrt{2 D t}},$$
with constants $a$ and $b$ determined from boundary and initial data. Setting $x=z=0$, and requiring $u(0, t)=u_{0}$ determines that $b=u_{0}$. Setting $t=0$, i.e., $z=\infty$, and requiring $u(x, 0)=0$ implies that $a=-u_{0} \sqrt{\frac{2}{\pi}}$, and consequently,
$$u(x, t)=u_{0}\left(1-\sqrt{\frac{2}{\pi}} \int_{0}^{z} \exp \left(-\frac{s^{2}}{2}\right) d s\right), \quad z=\frac{x}{\sqrt{2 D t}}$$
Plots of this solution plotted as a function of $z$ (a surrogate for $x$ ), and as a function of $z^{-\frac{1}{2}}$ (a surrogate for $t$ ) are shown in Figure $5.1$ and were made using Matlab code tube_diffusion.m.

## 数学代写|微分方程代写differential equation代考|On an Infinite Domain

∂在∂吨=Dr∂∂r(r∂在∂r),

dbd吨=4D,d一个d吨=4D一个b

2圆周率∫0∞在(r,吨)rdr=1

2圆周率∫0R在(r,吨)rdr=∫0R12D吨经验⁡(−r24D吨)rdr=1−经验⁡(−R24D吨)

F′X+F′=0.

dF′F′=−XdX

dFdX=一个经验⁡(−X22)

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MATH34O3

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Following Individual Particles

It may be that one is interested in following a single diffusing object. To do this, we make use of a fact about Brownian motion (which is the name for this process). Suppose one were able to precisely follow a particle and collect large amounts of data on its change of position, denoted $d x$, in a fixed time increment $d t$. Recall from above that the solution of the diffusion equation has the feature that the expected value of position of a particle is unchanging in time while the variance of position grows linearly in time with rate $2 D$. What this means for a fixed (small) time increment $d t$ is that $d x$ is random but distributed according to
$$d x=\sqrt{2 D d t} \mathcal{N}(0,1) .$$
In other words, $d x$ is a continuous random variable that is normally distributed with mean zero and variance 2 Ddt. The equation (4.1) is is called a stochastic differential equation as it specifies the change of position of the particle as a stochastic process, not as a deterministic process.

This, then, gives a formula for how to simulate a diffusion process. Specifically, let the position of the particle after $n$ time steps be denoted by $x_{n}$. Then, $x_{n}$ is updated by the formula
$$x_{n+1}=x_{n}+d x_{n},$$
where $d x_{n}$ is a random number chosen according to (4.1). The Matlab code that carries this out is entitled single_particle_diffusion.m, and ten examples of sample paths for a diffusing particle are shown in Figure 4.1.

## 数学代写|微分方程代写differential equation代考|Other Features of Brownian Particle Motion

Now that we know a little bit about how a diffusing particle moves, we can ask several other interesting questions. The first is to determine escape times. The question is as follows: How long, on average, does it take for a diffusing particle to escape from some region? In biological terms, how long does it take, on average, for a molecule that is made in the nucleus of a cell to diffuse to the boundary of the cell? Or, how long does it take a signaling molecule that is produced at the boundary of a cell to diffuse to the nucleus? A second question is, if there are two different places that a particle can escape from a region, what are the probabilities of escape through each exit? (This is called the splitting probability.)

Let’s begin by simulating this. First, for the exit time problem, simulate (using Matlab code first_exit_times.m) the motion of a Brownian particle on a one-dimensional line that starts at some position $0<x<L$, and let the simulation run until the particle hits $x=L$, with the additional restriction that the particle reflects off the boundary at $x=0$, i.e., the particle position is never allowed to be negative. For obvious reasons, the boundary at $x=0$ is called a reflecting boundary and the boundary at $x=L$ is called an absorbing boundary.

An example of a simulation result is shown in Figure $4.2$, where several sample particle trajectories (a) and a histogram of first exit times for a simulation with 1,000 particles (b) are shown, with $D=1$ and $L=1$. In Figure $4.3$ are shown the simulated mean first exit times plotted as a function of initial position.

To simulate the splitting probability, start the particle at some position between $x=0$ and $x=L$ and allow the simulation to run until either $x \geq L$ or $x \leq 0$ and record the fraction of time the simulation terminates with $x \geq L$, call this $\pi_{L}$. A plot of the result from a simulation using Matlab code splitting_probability.m is shown in Figure 4.4.

## 数学代写|微分方程代写differential equation代考|Following Several Particles

It is possible to follow a small number of particles using the above simulation method. However, it is definitely not possible if the particle numbers are large, say a mole. To follow the diffusion of a medium number (whatever that means) of particles, we adopt the model (3.4) and do a stochastic simulation of it.

The direct stochastic simulation of (3.4) can be done using the Gillespie algorithm. To describe this algorithm, we start with the simple example of exponential decay, modeled by the equation
$$\frac{d u}{d t}=-\alpha u .$$
Since we already know how to track the number of particles in a single compartment, we can think about multiple compartments. Suppose there are a total of $M$ particles that are distributed among $N$ boxes, arranged in a row. Let $u_{j}, j=1, \ldots, N$, represent the integer number of particles in box $j$. We assume that each particle can leave its box and move to one of its nearest neighbors by an exponential process with rate $2 \alpha$ if it is an interior box, and rate $\alpha$ if it is a boundary box. Consequently, the rate of reaction, where by reaction we mean leaving its box, is $r_{j}=2 \alpha u_{j}$ for $j=2, \ldots, N-1$, and $r_{j}=\alpha u_{j}$ for $j=1, N$. Now, pick three uniformly distributed random numbers between 0 and 1 ; the first, $R_{1}$, we use to determine when the next reaction occurs, and the second two, $R_{2}$ and $R_{3}$, we use to determine which of the possible reactions it is. As described in Chapter 1 , the time increment to the $n$th reaction, $\delta t_{n}$, is taken to he
$$\delta t_{n}=\frac{-1}{R_{\Sigma}} \ln R_{1},$$
where $R_{\Sigma}=\sum_{j=1}^{K} r_{j}$. Then, take $j$ to be the smallest integer for which $R_{2}<\rho_{j}=$ $\frac{1}{R_{\Sigma}} \sum_{i=1}^{j} r_{i}$, and if $2 \leq j \leq N-1$, take the particle in the $j$ th box to move to the right if $R_{3}>\frac{1}{2}$ and to the left if $R_{3} \leq \frac{1}{2}$. If $j=1$, the particle moves to the right, and if $j=N$ it moves to the left.

Matlab code to simulate this process is titled discrete_diffusion_via_Gillespie.m. One thing worth noting is that the process becomes less and less noisy, and much slower to simulate, as more particles are included in the system, suggesting that for a sufficiently large number of particles we need not (and should not) use a Gillespie algorithm, but rather a direct simulation of the diffusion equation.

dX=2Dd吨ñ(0,1).

Xn+1=Xn+dXn,

## 数学代写|微分方程代写differential equation代考|Following Several Particles

(3.4) 的直接随机模拟可以使用 Gillespie 算法来完成。为了描述这个算法，我们从指数衰减的简单例子开始，由方程建模

d在d吨=−一个在.

d吨n=−1RΣln⁡R1,

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MATHS 2102

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Discrete Boxes

Suppose there are a number of boxes connected side-by-side along a one-dimensional line, with concentration of some chemical species $u_{j}$ in box $j,-\infty<j<\infty$. Now suppose that the chemical leaves box $j$ at rate $2 \lambda$, so that the concentration in box $j$ is governed by
$$\frac{d u_{j}}{d t}=-2 \lambda u_{j},$$
provided there is no inflow. This is exactly the decay process described in Section 1.3.1. However, here we assume that the particles that flow out of box $j$ are evenly split to go into the neighboring boxes $j-1$ and $j+1$. Consequently, half of the particles that leave boxes $j-1$ and $j+1$ enter box $j$, so that
$$\frac{d u_{j}}{d t}=\lambda u_{j-1}-2 \lambda u_{j}+\lambda u_{j+1}$$

It is a straightforward matter to simulate this system of ordinary differential equations. The Matlab file to do so is titled diffusion_via_MOL.m, and you are encouraged to run this code to see if what happens matches with your intuition.

Now suppose that $u_{j}$ is a sample of a smooth function $u(x, t)$ at points $x=j \Delta x$, i.e., $u_{j}=u(j \Delta x, t)$. Using Taylor’s theorem,
\begin{aligned} u_{j \pm 1} \equiv & u\left(x_{j} \pm \Delta x, t\right) \ =& u\left(x_{j}, t\right) \pm \Delta x \frac{\partial}{\partial x} u\left(x_{j}, t\right)+\frac{1}{2} \Delta x^{2} \frac{\partial^{2}}{\partial x^{2}} u\left(x_{j}, t\right) \ & \pm \frac{1}{6} \Delta x^{3} \frac{\partial^{3}}{\partial x^{3}} u\left(x_{j}, t\right)+O\left(\Delta x^{4}\right) \end{aligned}
Substituting this Taylor series into (3.4), It follows that
$$\frac{\partial u}{\partial t}=\lambda \Delta x^{2} \frac{\partial^{2} u}{\partial x^{2}}+O\left(\Delta x^{4}\right)$$
which, keeping only the largest terms in $\Delta x$, is the diffusion equation with diffusion constant $D=\lambda \Delta x^{2}$.

## 数学代写|微分方程代写differential equation代考|A Random Walk

Consider the problem where we take a number of random steps at discrete times, and for each step we make a decision to take a step of length $m \Delta x$ where $m=-1,0$, or 1 , with probability $\alpha, 1-2 \alpha$, and $\alpha$, respectively. Let $x_{n}$ be the position after $n$ steps, $x_{n}=\Delta x \sum_{j=1}^{n} m_{j}$.

The first thing to do here is to simulate this process. This is easy to do, and the Matlab code for this is entitled discrete_random_walk.m. (Or, with a group of friends or classmates, perform this experiment for yourselves, taking steps on a sidewalk to the left when a coin flip gives heads and a step to the right when a coin flip gives tails.) Examples of sample paths for this process are shown in Figure 3.1(a) and the mean squared displacement $\left\langle x_{n}^{2}\right\rangle$, defined as $\left\langle x_{n}^{2}\right\rangle=\frac{1}{N} \sum_{N \text { trials }} x_{n}^{2}$, as a function of time step $n$, averaged over $N=1000$ particle trajectories, is shown in Figure 3.1(b).

Lel’s nuw salculate the probability that $x_{n}$ has the value $k \Delta x$, denuted $p_{k, n}=$ $P\left(x_{n}=k \Delta x\right)$
$$p_{k, n}=\alpha p_{k-1, n-1}+(1-2 \alpha) p_{k, n-1}+\alpha p_{k+1, n-1} .$$
In words, the probability that $x_{n}$ is $k \Delta x$ is the sum of three terms, $\alpha$ times the probability that $x_{n-1}$ is $(k-1) \Delta x, \alpha$ times the probability that $x_{n-1}$ is $(k+1) \Delta x$, and $1-2 \alpha$ times the probability that $x_{n-1}$ is $k \Delta x$. Now, suppose that $p_{k, n}=P\left(x_{n}=k \Delta x\right)$ is the sampling of a smooth function $p(x, t)$, where $p_{k, n}=P\left(x_{n}=k \Delta x\right)=p(k \Delta x, n \Delta t)$. Again, using Taylor series, it follows that, to leading order in $\Delta t$ and $\Delta x$ (i.e., keeping only the largest terms in $\Delta t$ and $\Delta x$,
$$\frac{\partial p}{\partial t}=\alpha \frac{\Delta x^{2}}{\Delta t} \frac{\partial^{2} p}{\partial x^{2}}$$
which is, once again, the diffusion equation, with diffusion coefficient $D=\alpha \frac{\Delta x^{2}}{\Delta t}$. This is the same diffusion coefficient as above if we make the identification $\lambda=\frac{\alpha}{\Delta t}$.

## 数学代写|微分方程代写differential equation代考|The Cable Equation

The third derivation of the diffusion equation comes from a completely different, and perhaps surprising, consideration.

The membrane of a cell is a phospholipid bilayer that acts as a barrier to the movement of ions between the intracellular (inside) and extracellular (outside) spaces. As a barrier, it can store charge much like a capacitor. Further, the movement of ions across a membrane is carefully regulated and they flow through a variety of ion channels. This is true for many electrically active cells, including neurons, cardiac cells, and smooth muscle cells. For example, the neurons studied by Hodgkin and Huxley (see Exercise 1.11) have three different ion species that flow through ion channels. These are depicted in Figure $3.2$ as $I_{N a}, I_{K}$, and $I_{l}$, for sodium, potassium, and leak, respectively. Consequently, the electrical nature of these cells can be described by a capacitor (the membrane) and resistors (the ion channels) in parallel, as shown in the circuit diagram in Figure 3.2. For this diagram there are two transmembrane currents, the ionic currents $I_{\text {ion }}$, and the capacitive current. The fundamental law of capacitance states that the total charge on the capacitor is capacitance times voltage, $Q=C_{m} V$, where $C_{m}$ is the membrane capacitance, and $V=V_{i}-V_{e}$ is the transmembrane voltage potential, $V_{i}$ and $V_{e}$ are the intracellular and extracellular voltage potentials, respectively. This implies that the capacitive current is $I_{c}=\frac{d Q}{d t}=C_{m} \frac{d V}{d t}$. Thus, the total transmembrane current, $I_{t}$, is the sum of capacitive and ionic currents, i.e.,
$$C_{m} \frac{d V}{d t}+I_{\text {ion }}=I_{t} .$$
This model applies only for a small homogeneous patch of membrane. However, nerve cells, or neurons, have axons, that are long slender cylindrical projections that extend away from the neuron’s cell body, or soma, and can be quite long (cf. Figure 3.3). For example, the human sciatic nerve originates in the lower back and extends down the back of the thigh and leg, ending in the foot.

To incorporate the effects of an elongated membrane, we view the axon as a long cylindrical piece of membrane surrounding an interior of cytoplasm (called a cable), and suppose that everywhere along its length, the potential depends only on the length variable and not on radial or angular variables. We divide the cable into a number of short pieces of isopotential membrane each of length $d x$, two sections of which are depicted in Figure 3.4.

## 数学代写|微分方程代写differential equation代考|Discrete Boxes

d在jd吨=−2λ在j,

d在jd吨=λ在j−1−2λ在j+λ在j+1

∂在∂吨=λΔX2∂2在∂X2+○(ΔX4)

## 数学代写|微分方程代写differential equation代考|A Random Walk

Lel’s nuw 计算出以下概率Xn有价值ķΔX, 表示pķ,n= 磷(Xn=ķΔX)

pķ,n=一个pķ−1,n−1+(1−2一个)pķ,n−1+一个pķ+1,n−1.

∂p∂吨=一个ΔX2Δ吨∂2p∂X2

C米d在d吨+我离子 =我吨.

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MAST20030

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Multiple Species

This method of simulation and analysis generalizes readily to the situation where there are multiple species and multiple reactions. At any given time, the state vector is the vector of integers $\mathcal{S}=\left(n_{1}, n_{2}, \ldots, n_{K}\right)$, and there are $J$ reactions with rates $r_{j}$ that depend on the state of the system $\mathcal{S}$. For each reaction there is a change in the state vector $c(j, k)$, meaning that if reaction $j$ occurs, the $k$ th integer $n_{k}$ changes by the amount $c(j, k)$.
As an example, consider the SIR reactions
$$S+I \stackrel{\alpha}{\longrightarrow} 2 I, \quad I \stackrel{\beta}{\longrightarrow} R .$$
Here $S$ represents susceptible individuals in a population, $I$ represents the infected and contagious individuals, and $R$ represents those individuals who are removed and no longer contagious. The deterministic differential equations for these reactions are given by (1.63), however, as we all know from experience with COVID-19, the evolution of an epidemic is highly stochastic.

An interesting question to ask is how many individuals have been infected and how many susceptibles remain (or survive) after an infection has run its course, and we can address this question using a stochastic simulation. The setup for this stochastic simulation is straightforward. The state space is identified by the three integers $n_{s}, n_{i}$, and $n_{r}$, and the two reactions are at rates
$$r_{1}=\alpha n_{s} n_{i}, \quad r_{2}=\beta n_{i},$$
and the change matrix $C=c(j, k)$ is
$$C=\left(\begin{array}{ccc} -1 & 1 & 0 \ 0 & -1 & 1 \end{array}\right)$$
This is easily implemented in Matlab code and in fact, the code that does this is titled stochastic_SIR.m.

Scatter plots of recovery times vs. number of survivors for the SIR stochastic process shown in Figure $1.10$ are surprising, and are certainly different than what is predicted by the deterministic model. (Recovery time refers to the first time at which there are no more infected individuals.) The deterministic model predicts a unique outcome (recall (1.67)), with an epidemic spreading if $R_{0}=\frac{\alpha s(0)}{\beta}>1$ and not spreading if $R_{0}=\frac{\alpha s(0)}{\beta}<1$. However, in Figure $1.10(\mathrm{a})$, where $R_{0}=2.5$, the results of the stochastic simulation show a biphasic outcome, with many of the trials, as expected, having a large epidemic with few survivors and long recovery times, but also with a significant number of trials with little spread of the infection, a large percentage of survivors, and a short recovery time. Similarly, in Figure $1.10(\mathrm{~b})$, where $R_{0}=0.9$, most of the trials result in a short-lived epidemic with a high percentage of survivors. However, there are nonetheless quite a few trials showing a substantial epidemic with few survivors and long recovery times, noticeably different than the prediction of the deterministic model.

## 数学代写|微分方程代写differential equation代考|The Conservation Law

The purpose of this text can be summarized as learning how to count biological objects as they change over time. Demographers do this by taking a census of their population of interest from time to time and then making a plot of the pointwise values and connecting the points with lines. This approach is of limited value because it gives no explanation, or mechanism, for the observed changes, and it has no predictive value. Even if data points are fit to a regression curve, there is no confidence that the fit curve can be extrapolated to values outside the range of times for which data was collected.
The approach taken here is to recognize that for any quantity of some material with density $u$ (i.e., number per unit volume) which is changing in time, it must be that the total amount of the material in some region of space can change only because of flux (i.e., movement) across the boundary or production/destruction in the interior of the region. In mathematical language, this can be stated as
$$\frac{d}{d t} \int_{\Omega} u d V=-\int_{\partial \Omega} \mathbf{J} \cdot \mathbf{n} d S+\int_{\Omega} f d V$$
where $\Omega$ is a closed region in space, $\partial \Omega$ is its boundary surface, and $\mathbf{n}$ is the outward unit normal to the boundary of $\Omega$. Here, $f$ is the rate of production (or destruction, if $f$ is negative) of $u$. Since the units of the terms on the left and right hand side of this equation must match, $f$ must have units of $u$ /time. Since $d V$ has units of volume, and $d S$ has units of area, the flux $\mathbf{J}$ is the vector-valued quantity with units of $u$ times length/time, i.e., units of $u$ times velocity, which is the same as number per unit area per time. ${ }^{1}$ The minus sign here is to recognize that if $\mathbf{J} \cdot \mathbf{n}$ is positive, then the flux of material is outward across the boundary, hence decreasing the amount of material in the domain.

## 数学代写|微分方程代写differential equation代考|Examples of Flux—How Things Move

There are several examples of flux that are important in biology.
Advection. Suppose particles with concentration $u$ are dissolved in water and the water is moving with velocity $\mathbf{v}$ and that the dissolved particles are moving with the same velocity. The flux of concentration at any point is the velocity of the water times the concentration
$$\mathbf{J}=\mathbf{v} u$$
This flux is a pointwise object having units of concentration times velocity. If this is constant in a tube like a vein or artery. with crossectional area $A$, then the flow in the tube is given by
$$Q=A \mathbf{J}=A \mathbf{v} u,$$
which has units of volume times concentration per unit time $=$ number of particles per unit time. This formula will be useful for Exercise 2.3.

Fick’s law. If individual particles have a velocity that is different than that of the water in which they are dissolved, for example, a random motion, then we might reasonably expect that they would tend to spread out, by moving, on average, down their concentration gradient. This is certainly what happens in our ordinary experience. For example, if you put a drop of ink into water, it will very quickly disperse, or diffuse, away, and eventually the ink will be uniformly distributed throughout the water, with no regions with higher or lower concentration. In math language, this is stated as
$$\mathbf{J}=-D \nabla u,$$
and is called Fick’s law, and $D$ is called the diffusion coefficient. Notice that $D$ must have units of (length) ${ }^{2}$ /time, since the flux must have units of velocity times units of $u$.
Fick’s law is not truly a law, but a model, hence appropriate in certain contexts. For example, it applies if the particles are diffuse with no self-interactions, but not so few that $u$ cannot be viewed as a continuous variable.

## 数学代写|微分方程代写differential equation代考|Multiple Species

r1=一个nsn一世,r2=bn一世,

C=(−110 0−11)

SIR 随机过程的恢复时间与幸存者数量的散点图如图所示1.10令人惊讶，并且肯定与确定性模型所预测的不同。（恢复时间是指第一次没有更多受感染的个体。）确定性模型预测一个独特的结果（回忆（1.67）），如果流行病传播，R0=一个s(0)b>1如果不传播R0=一个s(0)b<1. 然而，在图1.10(一个)， 在哪里R0=2.5，随机模拟的结果显示出双相结果，正如预期的那样，许多试验具有大规模流行病，幸存者很少，恢复时间长，但也有大量试验，感染传播很少，大存活率高，恢复时间短。同样，在图1.10( b)， 在哪里R0=0.9，大多数试验导致一种短暂的流行病，幸存者比例很高。然而，仍有相当多的试验表明，大规模流行病几乎没有幸存者，恢复时间很长，这与确定性模型的预测明显不同。

## 数学代写|微分方程代写differential equation代考|The Conservation Law

dd吨∫Ω在d在=−∫∂ΩĴ⋅nd小号+∫ΩFd在

Ĵ=在在

Ĵ=−D∇在,

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MATH 2003

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Modeling Chemical Reactions

1.2.4. Modeling Chemical Reactions. One of the important uses of differential equations, at least in this book, is to model the dynamics of chemical reactions. The two elementary reactions that are of most importance here are conversion between species, denoted
$$A \stackrel{\alpha}{\rightleftarrows} B,$$

called a first order reaction, and formation and degradation of a product from two component species, denoted
$$A+B \underset{\approx}{\rightleftarrows} C$$
called a second order reaction.
The differential equations describing the first of these are
$$\frac{d a}{d t}=\beta b-\alpha a, \quad \frac{d b}{d t}=-\beta b+\alpha a$$
where $a=[A]$ and $b=[B]$, is the statement in math symbols that $B$ is created from $A$ at rate $\alpha[A]$ and $A$ is created from $B$ at rate $\beta[B]$. Of course, the total of $A$ and $B$ is a conserved quantity, since $\frac{d}{d t}(a+b)=0$.
The second of these reactions is described by the three differential equations
$$\frac{d a}{d t}=-\gamma a b+\delta c, \quad \frac{d b}{d t}=-\gamma a b+\delta c, \quad \frac{d c}{d t}=\gamma a b-\delta c$$
where $c=[C]$, which puts into math symbols the fact that $C$ is created from the combination of $A$ and $B$ at a rate that is proportional to the product $[A][B]$, called the law of mass action. Notice that the units of $\gamma$ are different ((time) ${ }^{-1}$ (concentration $)^{-1}$ ) than those for first order reactions ((time) $\left.{ }^{-1}\right)$. The degradation of $C$ into $A$ and $B$ is a first order reaction. For this reaction there are two conserved quantities, namely $[A]+[C]$ and $[B]+[C]$

An important example of reaction kinetics occurs in the study of epidemics, with the so-called SIR epidemic. Here $S$ represents susceptible individuals, I represents infected individuals, and $R$ represents recovered or removed individuals. We represent the disease process by the reaction scheme
$$S+I \stackrel{\alpha}{\longrightarrow} 2 I, \quad I \stackrel{\beta}{\longrightarrow} R$$
This implies that a susceptible individual can become infected following contact with an infected individual, and that infected individuals recover at an exponential rate.

## 数学代写|微分方程代写differential equation代考|Stochastic Processes

1.3.1. Decay Processes. Now that we have the review of differential equations behind us, we must face the fact that differential equation descriptions of biological processes are at best, highly idealized. This is because biological processes, and in fact many physical processes, are not deterministic, but noisy, or stochastic. This noise, or randomness, could be because, while the process actually is deterministic, we do not have the ability or the patience to accurately calculate the outcome of the process. For example, the flipping of a coin or the spin of a roulette wheel has a deterministic result, in that, if initial conditions were known with sufficient accuracy, an accurate calculation of the end result could be made. However, this is so impractical that it is not worth pursuing. Similarly, the motion of water vapor molecules in the air is by completely deterministic process (following Newton’s Second Law, no quantum physics required) but determining the behavior of a gas by solving the governing differential equations for the position of each particle is completely out of the question.

There are other processes for which deterministic laws are not even known. This is because they are governed by quantum dynamics, having possible changes of state that cannot be described by a deterministic equation. For example, the decay of a radioactive particle and the change of conformation of a protein molecule, such as an ion channel, cannot, as far as we know, be described by a deterministic process. Similarly, the mistakes made by the reproductive machinery of a cell when duplicating its DNA (i.e., the mutations) cannot, as far as we currently know, be described by a deterministic process.

Given this reality, we are forced to come up with another way to describe interesting processes. And this is by keeping track of various statistics as time proceeds. For example, it may not be possible to exactly track the numbers of people who get the flu every year, but an understanding of how the average number changes over several years may be sufficient for health care policy makers. Similarly, with carbon dating techniques, it is not necessary to know exactly how many carbon- 14 molecules there are in a particular painting at a particular time, but an estimate of an average or expected number of molecules can be sufficient to decide if the painting is genuine or a forgery.
1.3.1.1. Probability Theory. To make some progress in this way of describing things, we must define some terms. First, there must be some object that we wish to measure or quantify, also called a random variable, and the collection of all possible outcomes of this measurement is called its state space, or sample space. For example, the flip of a coin can result in it landing with head or tail up, and these two outcomes constitute the state space. Similarly, an ion channel may at any given time be either open or closed, and this also constitutes its state space. The random variable could be a discrete or continuous variable taking on only integer values if it is discrete or a real valued number or vector if it is continuous.

## 数学代写|微分方程代写differential equation代考|Several Reactions

1.3.2. Several Reactions. In the example of particle decay there was only one reaction possible. However, this is not typical as most chemical reactions involve a range of possible reactions. For example, suppose a particle (like a bacterium) may reproduce at some rate or it may die at a different rate. The question addressed here is how to do a stochastic simulation of this process.

Suppose the state $S_{j}$ can transition to the state $S_{k}$ at rate $\lambda_{k j}$. To do a stochastic simulation of this process, we must decide when the next reaction takes place and which reaction it is that takes place.

To decide when the next reaction takes place, we use the fact that the probability that the next reaction has taken place by time $t$ is 1 minus the probability that the next reaction has not taken place by time $t$. Furthermore, the probability that the reaction from state $j$ to state $k$ has not taken place by time $t$ is $\exp \left(-\lambda_{k j} t\right)$. So, the probability that no reaction has taken place by time $t$ (since these reactions are assumed to be independent) is
$$\prod_{k} \exp \left(-\lambda_{k j} t\right)=\exp \left(-\sum_{k} \lambda_{k j} t\right) .$$
It follows that the cdf for the next reaction is
$$1-\exp \left(-\sum_{k} \lambda_{k j} t\right)=1-\exp (-r t),$$
where $r=\sum_{k} \lambda_{k j}$. In other words, the next reaction is an exponential process with rate $r$
Next, the probability that the next reaction is the $i$ th reaction $S_{j} \rightarrow S_{i}$ is
$$p_{i j}=\frac{\lambda_{i j}}{\sum_{k} \lambda_{k j}}=\frac{\lambda_{i j}}{r} .$$
To be convinced of this, apply the results of Exercise $1.26$ to the case where either the $S_{j} \rightarrow S_{i}$ reaction occurs first or another reaction occurs first.

With these facts in hand, as we did above, we pick the next reaction time increment to be
$$\dot{\delta} t=\frac{-1}{r} \ln R_{1} \text {, }$$
where $0<R_{1}<1$ is a uniformly distributed random number. Next, to decide which of the reactions to implement, construct the vector $x_{k}=\frac{1}{r} \sum_{i=1}^{k} \lambda_{i j}$, the scaled vector of cumulative sums of $\lambda_{i j}$. Notice that the vector $x_{k}$ is ordered with $0 \leq x_{1} \leq x_{2} \leq \cdots \leq$ $x_{N}=1$, where $N$ is the total number of states. Now, pick a second random number $R_{2}$, uniformly distributed between zero and one, and pick the next reaction to be $S_{j} \rightarrow S_{k}$ where
$$k=\min {j}\left{R{2} \leq x_{j}\right}$$

## 数学代写|微分方程代写differential equation代考|Modeling Chemical Reactions

1.2.4。模拟化学反应。至少在本书中，微分方程的重要用途之一是模拟化学反应的动力学。这里最重要的两个基本反应是物种之间的转化，表示为

d一个d吨=bb−一个一个,dbd吨=−bb+一个一个

d一个d吨=−C一个b+dC,dbd吨=−C一个b+dC,dCd吨=C一个b−dC

## 数学代写|微分方程代写differential equation代考|Stochastic Processes

1.3.1。衰减过程。既然我们已经回顾了微分方程，我们必须面对这样一个事实，即生物过程的微分方程描述充其量是高度理想化的。这是因为生物过程，实际上是许多物理过程，不是确定性的，而是嘈杂的或随机的。这种噪音或随机性可能是因为虽然过程实际上是确定性的，但我们没有能力或耐心来准确计算过程的结果。例如，掷硬币或转动轮盘赌具有确定性结果，因为如果初始条件足够准确，则可以对最终结果进行准确计算。然而，这太不切实际了，不值得追求。相似地，

1.3.1.1。概率论。为了在这种描述事物的方式上取得一些进展，我们必须定义一些术语。首先，必须有一些我们希望测量或量化的对象，也称为随机变量，并且该测量的所有可能结果的集合称为其状态空间或样本空间。例如，抛硬币会导致它头朝上或尾部朝上落地，这两种结果构成了状态空间。类似地，离子通道可以在任何给定时间打开或关闭，这也构成了它的状态空间。随机变量可以是离散变量或连续变量，如果它是离散的，则它可以是仅取整数值的变量，或者如果它是连续的，则可以是实数值或向量。

## 数学代写|微分方程代写differential equation代考|Several Reactions

1.3.2. 几个反应。在粒子衰变的例子中，只有一种反应可能。然而，这并不典型，因为大多数化学反应都涉及一系列可能的反应。例如，假设一个粒子（如细菌）可能以某种速度繁殖，或者它可能以不同的速度死亡。这里解决的问题是如何对这个过程进行随机模拟。

∏ķ经验⁡(−λķj吨)=经验⁡(−∑ķλķj吨).

1−经验⁡(−∑ķλķj吨)=1−经验⁡(−r吨),

p一世j=λ一世j∑ķλķj=λ一世jr.

d˙吨=−1rln⁡R1,

k=\min {j}\left{R{2} \leq x_{j}\right}

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 数学代写|微分方程代写differential equation代考|MATH2065

statistics-lab™ 为您的留学生涯保驾护航 在代写微分方程differential equation方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写微分方程differential equation代写方面经验极为丰富，各种代写微分方程differential equation相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|微分方程代写differential equation代考|Background Material

1.1.1. Partial Derivatives. In what is to come, we will be dealing with functions of both space and time. We may be interested in the electrolyte balance within muscle tissue, or the distribution of microorganisms occupying a lake; either way, we are studying how something occupying a region in space evolves over time. We often describe position in this space by using the Cartesian coordinates $x, y$, and $z$, and time by the variable $t$ (although other coordinate representations like polar or spherical coordinates are sometimes useful).

The quantity of interest may be the concentration (= number per unit volume) of calcium ions in a cell or the concentration of microorganisms in the lake, but it is typically denoted by some scalar function $u=u(x, y, z, t)$. If $u$ changes smoothly in time, then it has a time derivative $\frac{\partial u}{\partial t}$ defined by ${ }^{1}$
$$\frac{\partial u}{\partial t}=\lim {\Delta t \rightarrow 0} \frac{u(x, y, z, t+\Delta t)-u(x, y, z, t)}{\Delta t}$$ The fundamental theorem of calculus states that $$u(x, y, z, b)-u(x, y, z, a)=\int{a}^{b} \frac{\partial u}{\partial t} d t$$
In words, the cumulative change in $u$ over an interval of time can be measured by observing the difference between $u$ at the end and the beginning of the interval.

Similarly, if $u$ varies smoothly in space, spatial derivatives can be defined, such as
$$\frac{\partial u}{\partial x}=\lim _{\Delta x \rightarrow 0} \frac{u(x+\Delta x, y, z, t)-u(x, y, z, t)}{\Delta x},$$
and this is one component of the gradient of $u$, the vector-valued function
$$\nabla u=\left(\frac{\partial u}{\partial x}, \frac{\partial u}{\partial y}, \frac{\partial u}{\partial z}\right)$$
The gradient holds all of the information we need about how $u$ changes in space, but since there are an infinite number of directions in which we could move from a particular point, to find the derivative of $u$ in a particular direction, $\mathbf{v}$, where $\mathbf{v}$ is a unit vector, we define the directional derivative,
$$\frac{\partial u}{\partial \mathbf{v}}=\nabla u \cdot \mathbf{v} \text {. }$$
One important object that uses the gradient is
$$\mathbf{n}=\frac{\nabla u}{|\nabla u|},$$
which, provided $|\nabla u| \neq 0$, is a unit vector pointing in the direction of the greatest increase of the function $u$. The importance of this to a skier or snowboarder is obvious, pointing in the direction parallel to the “fall-line”. It is also noteworthy that $\mathbf{n}$ is perpendicular (orthogonal) to level surfaces of the function $u$. We can verify this by noting that if $(x(s), y(s), z(s))$ is a curve in space parametrized by $s$, the tangent direction of the curve is the vector $(\dot{x}(s), \dot{y}(s), \dot{z}(s))$. If the function $u(x, y, z)$ is a constant on this curve, $u(x(s), y(s), z(s))=C$, then differentiating this with respect to $s$, we find that
$$0=\frac{\partial u}{\partial x} \dot{x}(s)+\frac{\partial u}{\partial y} \dot{y}(s)+\frac{\partial u}{\partial z} \approx(s) \equiv \nabla u \cdot\left(\begin{array}{c} \dot{x}(s) \ \dot{y}(s) \ \dot{z}(s) \end{array}\right)$$
as claimed.

## 数学代写|微分方程代写differential equation代考|Ordinary Differential Equations

1.2.1. First Order Equations. An nrdinary differential equation specifies a relationship between the (time) derivative of some quantity $u$ and its values through, say,
$$\frac{d u}{d t}=f(u, t) .$$
This equation is autonomous if $f$ is independent of $t$, so that
$$\frac{d u}{d t}=f(u) .$$
Many of the problems discussed in this book are autonomous in time.
If $u$ is a scalar quantity, the solution of equation (1.25) can be readily understood using graphical means, i.e., by plotting $\frac{d u}{d t}$ vs. $u$. An example is shown in Figure $1.1$.
Figure 1.1. Plot of $\frac{d u}{d t}$ vs. $u$ for the bistable function $f(u)=a u(1-u)(u-\alpha)$ with $\alpha=0.25, a=10 .$
The first things to notice are the zeros of $f(u)$, i.e., the equilibria. For the example $f(u)=a u(u-1)(\alpha-u)$, shown in Figure 1.1, the equilibria are at $u_{0}=0, u_{0}=$ $\alpha$, and $u_{0}=1$. Next, one can determine the direction of movement if $u$ is not at an equilibrium. These are shown with arrows in Figure 1.1. For example, if $00$ so that $u$ is increasing there. This is our first indication that $u_{0}=0$ and $u_{0}=1$ are stable equilibria, while $u_{0}=\alpha$ is unstable.

The next thing to do is to linearize the equations about the equilibria. Linearization is a very important procedure by which one reduces a nonlinear equation to a linear equation. ${ }^{3}$ It is a good idea to understand it thoroughly, because it is used often in this text.

## 数学代写|微分方程代写differential equation代考|Systems of first order equations

1.2.2. Systems of first order equations. We now turn our attention to systems of first order equations, which can still be written in the form of (1.24) provided we recognize that $u$ is a vector, rather than a scalar, quantity. The most important example for this text is when there are two unknown scalar functions $u(t)$ and $v(t)$ and the equations describing their evolution are in the form
\begin{aligned} \frac{d u}{d t} &=f(u, v) \ \frac{d v}{d t} &=g(u, v) \end{aligned}
As with first order equations, a useful way to proceed is with a graphical, or phase plane, analysis. The first step of this analysis is to plot the nullclines, the curves in the $u-v$ plane along which either $u$ or $v$ do not change, i.e., $\frac{d u}{d t}=0$ or $\frac{d v}{d t}=0$.

There are many examples of this procedure in this book, however, for purposes of illustration, let’s look at solutions of the second order differential equation
$$\frac{d^{2} u}{d t^{2}}+f(u)=0$$
where $f(u)=a u(1-u)(u-\alpha)$, the same function as used above. To write this equation as a first order system, we set $v=\frac{d u}{d t}$, and then the equations are
\begin{aligned} &\frac{d u}{d t}=v \ &\frac{d v}{d t}=-f(u) \end{aligned}
The nullclines for this system are easily determined, being the line $v=0$ for the $u$ nullcline, and $f(u)=0$ for the $v$ nullclines, i.e., the lines $u=0, u=\alpha$, and $u=1$. These are shown plotted in Figure $1.3$ as dashed lines.

The next step is to identify all the critical points, i.e., the points at which $\frac{d u}{d t}$ and $\frac{d v}{d t}$ are simultaneously zero, hence, points of equilibrium. These are, of course, all the intersections of the $u$ and $v$ nullclines. For this example, they are the points with $v=0$ and $u=0, \alpha$ and 1 .

## 数学代写|微分方程代写differential equation代考|Background Material

1.1.1。偏导数。在接下来的内容中，我们将处理空间和时间的功能。我们可能对肌肉组织内的电解质平衡或占据湖泊的微生物分布感兴趣；无论哪种方式，我们都在研究占据空间区域的事物如何随着时间的推移而演变。我们经常使用笛卡尔坐标来描述这个空间中的位置X,是， 和和, 和时间由变量吨（尽管有时极坐标或球坐标等其他坐标表示很有用）。

∂在∂吨=林Δ吨→0在(X,是,和,吨+Δ吨)−在(X,是,和,吨)Δ吨微积分基本定理指出

∂在∂X=林ΔX→0在(X+ΔX,是,和,吨)−在(X,是,和,吨)ΔX,

∇在=(∂在∂X,∂在∂是,∂在∂和)

∂在∂在=∇在⋅在.

n=∇在|∇在|,

0=∂在∂XX˙(s)+∂在∂是是˙(s)+∂在∂和≈(s)≡∇在⋅(X˙(s) 是˙(s) 和˙(s))

## 数学代写|微分方程代写differential equation代考|Ordinary Differential Equations

1.2.1。一阶方程。一个普通微分方程指定了某个量的（时间）导数之间的关系在以及它的价值，比如说，

d在d吨=F(在,吨).

d在d吨=F(在).

## 数学代写|微分方程代写differential equation代考|Systems of first order equations

1.2.2。一阶方程组。我们现在将注意力转向一阶方程组，只要我们认识到在是一个向量，而不是一个标量，数量。本文最重要的例子是当有两个未知的标量函数时在(吨)和在(吨)描述它们演化的方程是

d在d吨=F(在,在) d在d吨=G(在,在)

d2在d吨2+F(在)=0

d在d吨=在 d在d吨=−F(在)

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。