## ordinary differential equations – Periodic trajectory of a linear spring-mass damper

Given the following equation:

$$ddot and + frac {1} {4} dot and + 2y = 0; space space space y (0) = 0, space dot and (0) = 2$$

Under what condition would the phase diagram be closed?

Solving the ivp to obtain the phase diagram shown here:

where:
$$y = frac {16} { sqrt {127}} e ^ {- t / 8} * sin ( frac { sqrt {127}} {8} t)$$
$$dot y = frac {2} {127} e ^ {- t / 8} * (127cos ( frac { sqrt {127}} {8} t) – sqrt {127} without ( frac { sqrt {127}} {8} t))$$

My initial thought would be if the coefficient of $$dot y = 0$$ or if $$dot y = 0$$ in itself, then the plot of the phase would close. However, I think this would change the government equation and is not necessarily a & # 39; condition & # 39;

My question is basically: What must be enforced so that a linear spring-mass damping system shows a periodic trajectory? (closed phase diagram)

Any help would be very much appreciated!

## differential equations – Parametric performance optimization function

System configuration:

``````eqs = {a'(t) == -k1 a(t) b(t), b'(t) == -k1 a(t) b(t),
c'(t) == k1 a(t) b(t) - k2 c(t), d'(t) == k2 c(t) - k3 d(t),
e'(t) == k3 d(t)};
initCond = {a(0) == a0, b(0) == 0, c(0) == 0, d(0) == 0, e(0) == 0};
impulse = {WhenEvent(t == t0, b(t) -> b(t) + bAdded,
"LocationMethod" -> "LinearInterpolation")};
addeq = {Fa(t) == epsa a(t), Fc(t) == epsc c(t), Fd(t) == epsd d(t),
Fe(t) == epse e(t), Ftot(t) == Fa(t) + Fc(t) + Fd(t) + Fe(t)};
tDepVars = {a, b, c, d, e, Fa, Fc, Fd, Fe, Ftot};
fixedParams = SetPrecision({a0 -> 1, epsa -> 0.16, bAdded -> 1, t0 -> 100}, 30);
varParams = Keys(initGuesses);
``````

Find a parametric solution:

``````solution = ParametricNDSolve(Join(eqs, initCond, addeq, impulse) /. fixedParams,
tDepVars, {t, 0, 500}, varParams, WorkingPrecision -> 30);
``````

Sometimes, this solution is fast and sometimes extremely slow.

``````variableGuess(var_) := SetPrecision({k1 -> 0.09, k2 -> var, k3 -> 0.00025, epsc -> 2.6,
epsd -> 2.1, epse -> 2.6}, 30);
result = Table({10^i, AbsoluteTiming(((Ftot /. solution) @@
(Values(variableGuess(10^i))))(t))}, {i, -5, 3});
ListLogLogPlot(Transpose@{result((All, 1)), result((All, 2, 1))})
``````

In some critical cases for me, the time it takes to find the solution is running out. `Dynamic` things within which all this operates.

Any suggestions to improve performance?

## differential geometry dg: twist holomorphic vector packages and Euler features

Given a holomorphic vector pack $$mathcal {V}$$ on a compact complex collector $$M$$, it seems that even if $$mathcal {V}$$ it is not trivial, so it can still have the trivial feature of Euler, which
$$sum_ {k = 0} ^ { mathrm {dim} (M)} (-1) ^ k H ^ {(0, k)} ( mathcal {V}) = 0.$$
Is it true that for a set of positive lines $$mathcal {L}$$, one can always find a large enough $$n$$, so that the twisted vector pack $$mathcal {V} otimes mathcal {L} ^ { otimes n}$$ Will it have the non-trivial feature of Euler?

## Correction test – Differential interval partition problem – organize conferences in a minimum number of classrooms

The problem of scheduling conferences in a minimum number of classrooms is the following:
Find the minimum number of classrooms to schedule all classes, so that two do not occur at the same time in the same room.

The common algorithm that I find in books is:

``````Sort intervals by starting time so that s1 ≤ s2 ≤ ... ≤ sn.
d ← 0 //number of classrooms
for j = 1 to n {
if (lecture j is compatible with some classroom k)
schedule lecture j in classroom k
else
allocate a new classroom d + 1
schedule lecture j in classroom d + 1
d ← d + 1
}
``````

Now, I was thinking of an alternative approach in which I order my classes by finishing the times in ascending order and every time I check if class j is compatible with some class k and if there are several classes that are compatible with that class, I program it in classroom where the last work in that classroom ends is closer to the start time of the work, that is, it minimizes the time that a classroom is empty.

``````Sort intervals by starting time so that f1 ≤ f2 ≤ ... ≤ fn.
d ← 0 //number of classrooms
for j = 1 to n {
if (lecture j is compatible with some classroom k)
schedule lecture j in classroom k which was used last
else
allocate a new classroom d + 1
schedule lecture j in classroom d + 1
d ← d + 1
}
``````

I would like to know if this approach is correct (not necessarily optimal). I've run it dry in a couple of cases, and it seems fine. If yes, how can I prove its correction? If not, how can the changes make the algorithm work?

## differential equations: why does Mathematica give this second solution to this first-order linear PDE \$ w_t + 3 t w_x = w \$?

I was trying to verify my manual solution with Mathematica, and it gives me an additional solution, which I don't understand how it came about. Nor can I verify the second solution.

Here is the pde specification. Solve $$w (x, t)$$

$$frac { partial w} { partial t} +3 t frac { partial w} { partial x} = w (x, t) tag {1}$$

with initial conditions $$w (x, 0) = f (x)$$.

Here is the code (Using `w` in DSolve instead of standard `w(x,t)` to get the solution using `Function` to make it easier to verify)

``````ClearAll("Global`*");
pde = D(w(x, t), t) + 3*t*D(w(x, t), x) == w(x, t);
ic = w(x, 0) == f(x);
sol = DSolve({pde, ic}, w, {x, t}) (*Assumptions -> t > 0 has no effect*)
``````

Gives

It is the first solution above which I have doubts that it is correct. Note that add `Assumptions -> t > 0` to `DSolve` It has no effect The same solutions are obtained.

Now, the second solution verifies OK, but not the first.

`````` Assuming(t > 0, Simplify(pde /. sol((1, 1))))
``````

`````` Assuming(t > 0, Simplify(pde /. sol((2, 1))))
``````

The question is: Is the first solution above correct? If so, why isn't it verified and how did Mathematica get it? Below is the manual solution.

## Appendix

My manual solution was trying to verify using Mathematica:

Leave $$w equiv w left (x left (t right), t right)$$ so
$$begin {equation} frac {dw} {dt} = frac { partial w} { partial x} frac {dx} {dt} + frac { partial w} { partial t} tag {2} end {equation}$$

Compare (1,2) shows that

begin {align} frac {dw} {dt} & = w tag {3} \ frac {dx} {dt} & = 3t tag {4} end {align}

Solve (3) gives

$$begin {equation} w = Ce ^ t nonumber end {equation}$$

From initial conditions in $$t = 0$$, the above becomes $$f left (x left ( 0 right) right) = C$$. Therefore, the above becomes

$$begin {equation} w left (x, t right) = f left (x left (0 right) right) e ^ {t} tag {5} end {equation}$$

From (4)

begin {align *} x & = frac {3} {2} t ^ {2} + x left (0 right) \ x left (0 right) & = x- frac {3} {2} t ^ {2} end {align *}

Substituting the above in (5) da

$$w left (x left (t right), t right) = f left (x- frac {3} {2} t ^ {2} right) e t$$

## dg. differential geometry: what is the shape of the pizza curve \$ (v_0, v_1) \$?

Suppose there are two pizzerias (in competition) located at the points $$0$$ Y $$1$$ in the complex plane These pizzerias can deliver pizza to points of the plane with the highest speeds $$v_0$$ Y $$v_1$$respectively.

Definition. A closed subset $$P$$ of the complex plane is called $$(v_0, v_1)$$pizza curve Yes $$P$$ it is a common limit of two open connected sets $$U_0, U_1$$ in $$mathbb C$$ such that

$$bullet$$ $$0 in U_0$$ Y $$1 in U_1$$;

$$bullet$$ $$U_0 cap U_1 = emptyset$$ Y $$U_0 cup P cup U_1 = mathbb C$$.

$$bullet$$ by any point $$z in B$$ there is a positive real number $$t_z$$ such that

(i) for each $$varepsilon> 0$$ and every $$k in {0,1 }$$ there is a smooth curve $$gamma_k: (0, t_z + varepsilon) a U_k$$ such that $$gamma_k (0) = k$$, $$lim_ {t to t_z + varepsilon} gamma_k (t) = z$$ Y $$| gamma_k & # 39; (t) | le v_0$$ for each $$t in (0, t_z + varepsilon)$$;

(ii) for each $$varepsilon> 0$$ and every $$k in {0,1 }$$ there is no smooth curve $$gamma_0: (0, t_z- varepsilon) a U_k$$ such that $$gamma_k (0) = k$$, $$lim_ {t to t_z- varepsilon} gamma_k (t) = z$$ Y $$| gamma_k & # 39; (t) | le v_0$$ for each $$t in (0, t_z- varepsilon)$$.

Issue. What is the shape of a $$(v_0, v_1)$$-curve pizza? It's unique?

Observation 1. Yes $$v_0 = v_1$$, so the answer to this problem is well known: the $$(v_0, v_1)$$-The pizza curve is unique and matches the line. $${z in mathbb C: Re (z) = frac12 }$$. So, the problem essentially refers to the case $$v_0 ne v_1$$.

Observation 2. It can be shown that each $$(v_0, v_1)$$The pizza curve locally matches the graph of some Lipschitz function.

## differential equations: how to cut a complex number?

I am solving some iterative differential equations and I want to use Chop to get rid of noises smaller than a certain threshold. However, I discovered that Chop only "cuts" the real part, not the imaginary part. My question is, what function can I use to approximate the real and imaginary parts that are very close to zero by zero?

For example, if I try to do

``````A = 10^(-50);
B = I*10^(-50);
Chop(A + B)
``````

The result is exactly that same number (and not even the real number is actually being cut, so I'm not sure if I understand it correctly). I would like the result to be zero.

## differential equations – EDO coupled system

The solutions of the following ODE coupled system are the functions of Bessel. For example, if we require the solutions to be finite at the source, then the solutions are First Kind bessel Function J (x). While if the solutions must be finite in the infinite, we obtain solutions with respect to the Kessess function of second type K (x). Is it possible to impose such conditions in MATHEMATICS to obtain any of the solutions?

Here is the coupled ODE system:

``````p1 = Function({f, ρ}, (D(f, ρ) +  m/ρ f));
p2 = Function({f, ρ}, (D(f, ρ) - (m - 1)/ρ f ));
x1 = (-δ1 + μ01 - Ω1); x2 = (-δ1 - μ01 + Ω1); x3 = (δ1 - μ01 - Ω1); x4 = (δ1 + μ01 + Ω1);

eq1 = p2(ϕB1(ρ), ρ) - (ϵ1 - x1) ϕA1(ρ) + γ ϕA2(ρ);
eq2 = p1(ϕA1(ρ), ρ) + (ϵ1 - x2) ϕB1(ρ) - γ ϕB2(ρ);
eq3 = p1(ϕA2(ρ), ρ) + (ϵ1 - x3) ϕB2(ρ) - γ ϕB1(ρ);
eq4 = p2(ϕB2(ρ), ρ) - (ϵ1 - x4) ϕA2(ρ) + γ ϕA1(ρ);
``````

Note that `m` It is an integer while the rest of the parameters are real.

## differential equations – nonlinear ODE of the closed loop system and response (Part II)

Again I need help with Mathematica.
We have the following related system.
I need to get expressions that describe the changes in $$x_ {1} left (t right)$$ or $$x_ {2} left (t right)$$. The only thing that turned out to me was to build a numerical representation on the chart.
1. What command is used in Maple to obtain the equation of the desired output variable? I tried using the Extract command, but in response, the math showed only "$$x_ {1} left (t right)$$";
2. It is seen that the ODE is essentially nonlinear. How to present in mathematics not necessarily an exact solution, but at least in series form in a specific time interval?

There is my code:

``````asys = AffineStateSpaceModel({Subscript(x, 1)'(
t) == (Power(Subscript(x, 1)(t), 2) +
Power(Subscript(x, 2)(t), 2)) 0.2 Sin(4 t) - 0.2 Cos(4 t) +
Subscript(u, 1)(t),
Subscript(x, 2)'(
t) == (Power(Subscript(x, 1)(t), 2) +
Power(Subscript(x, 2)(t), 2)) 0.3 Sin(5 t) - 0.3 Cos(5 t) +
Subscript(u, 2)(t)}, {Subscript(x, 1)(t),
Subscript(x, 2)(t)}, {Subscript(u, 1)(t),
Subscript(u, 2)(t)}, {Subscript(x, 1)(t), Subscript(x, 2)(t)}, t)

Plot(OutputResponse({asys, -1}, {0, 0}, {t, 0, 500}) // Evaluate, {t,
0, 500})
``````

## differential equations – NDSolve :: ntdvdae: Cannot solve to find an explicit formula for derivatives

I face these error messages,

NDSolve :: ntdvdae: Cannot resolve to find an explicit formula for the
derivatives. NDSolve will attempt to resolve the system as
differential-algebraic equations.

plus

Power :: infy: Infinite expression 1/0. found

The equation in question is,

``````PDE = D(M(t, x, y), t) == 1/(x^2 + y^2)*D((x^2 + 1)*D(M(t, x, y), x), x) +
1/(x^2 + y^2)*D((-y^2 + 1)*D(M(t, x, y), y), y)

nv1 = NeumannValue(0, y == 1);
nv2 = NeumannValue(0, y == 0);
nv3 = NeumannValue(0, x == 0);
nv4 = NeumannValue(-Sqrt((x^2 + y^2)/(x^2 + 1))*Bi*M(t, x, y), x == xf);

Bi = 0.5; xf = 5;

sol = NDSolve({PDE == nv1 + nv2 + nv3 + nv4, M(0, x, y) == 1},
M, {x, 0, xf}, {y, 0, 1}, {t, 0, 10});
``````