# 中立型的初始值 DDE

${\mathit{y}}^{\prime }\left(\mathit{t}\right)=2\text{\hspace{0.17em}}\mathrm{cos}\left(2\mathit{t}\right){\mathit{y}\left(\frac{\mathit{t}}{2}\right)}^{2\text{\hspace{0.17em}}\mathrm{cos}\left(\mathit{t}\right)}+\mathrm{log}\left({\mathit{y}}^{\prime }\left(\frac{\mathit{t}}{2}\right)\right)-\mathrm{log}\left(2\text{\hspace{0.17em}}\mathrm{cos}\left(\mathit{t}\right)\right)-\mathrm{sin}\left(\mathit{t}\right).$

$\mathit{y}\left(0\right)=1,$

${\mathit{y}}^{\prime }\left(0\right)=\mathit{s}.$

$\mathit{s}$$2+\mathrm{log}\left(\mathit{s}\right)-\mathrm{log}\left(2\right)=0$ 的解。满足此方程的 $\mathit{s}$ 的值是 ${\mathit{s}}_{1}=2$${\mathit{s}}_{2}=0.4063757399599599$

### 编写时滞代码

delay = @(t,y) t/2;

### 编写方程代码

• t 是时间（自变量）。

• y 是解（因变量）。

• ydel 包含 y 的时滞。

• ypdel 包含 ${\mathit{y}}^{\prime }=\frac{\mathrm{dy}}{\mathrm{dt}}$ 的时滞。

• ydel$\to \mathit{y}\left(\frac{\mathit{t}}{2}\right)$

• ypdel $\to {\mathit{y}}^{\prime }\left(\frac{\mathit{t}}{2}\right)$

function yp = ddefun(t,y,ydel,ypdel)
yp = 2*cos(2*t)*ydel^(2*cos(t)) + log(ypdel) - log(2*cos(t)) - sin(t);
end

### 求解方程

tspan = [0 0.1];
y0 = 1;
s1 = 2;
sol1 = ddensd(@ddefun, delay, delay, {y0,s1}, tspan);

s2 = 0.4063757399599599;
sol2 = ddensd(@ddefun, delay, delay, {y0,s2}, tspan);

### 对解进行绘图

plot(sol1.x,sol1.y,sol2.x,sol2.y);
legend('y''(0) = 2','y''(0) = .40637..','Location','NorthWest');
xlabel('Time t');
ylabel('Solution y');
title('Two Solutions of Jackiewicz''s Initial-Value NDDE');

### 局部函数

function yp = ddefun(t,y,ydel,ypdel)
yp = 2*cos(2*t)*ydel^(2*cos(t)) + log(ypdel) - log(2*cos(t)) - sin(t);
end

### 参考

[1] Jackiewicz, Z.“One step Methods of any Order for Neutral Functional Differential Equations.”SIAM Journal on Numerical Analysis.Vol. 21, Number 3. 1984. pp. 486–511.