### 数学代写|微分方程代写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 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。