differential equations – Fourier Series of ODE

I am having trouble finding the Fourier series of a 2nd order ODE. Should I be using the piecewise function as well to set up the range for t?

Solve 𝑦′′ + 𝜔^2𝑦 = 𝑟(𝑡), where 𝑟(𝑡) = |𝑡|, -𝜋 < 𝑡 < 𝜋 using Fourier series

So far I have set up the ode and set equal to r(t)
r(t)=y''(t)+omega^2*y(t)
Plot(r(t),{t,-Pi,Pi})
Any help with the mathematica code would be greatly appreciated. How can I find An, Bn with the function being an ODE

real analysis – Definition of the flow of an ODE and its inverse

At lesson, the teacher considers a flow $Phi$ given by the solutions of the ode system for $tin(0, T)$ and $xinmathbb R^d$,
$$
begin{cases}
y'(s)=b(y(s), s),&sleq T\
y(t)=x
end{cases},qquad(star)
$$

that is $Phi(x, t, s)=y(s)$ solving $(star)$. He said that we will be mostly concerned with $Phi(cdot, 0, cdot)$. The field $b$ is assumed to be Lipschitz continuous in both variables and bounded.

Then, he intoduces the inverse $Psi$ of the above flow as follows: $Psi(x, 0, s)=y(s)$ satisfying
$$
begin{cases}
y'(s)=-b(y(s), t-s),&s<tleq T\
y(0)=x
end{cases},
$$

and he said that $Psi$ is such that
$$
Phi(Psi(x, 0, s), 0, s)=x,quad Psi(Phi(x, 0, s), 0, s)=x.qquad (starstar)
$$

I do not understand $(starstar)$. Can someone help me? Maybe is the definition of the inverse wrong?

Thank you

differential equations – Numerical solution for ODE using NDSolve

I want to solve the following ODE:

y'(z)==-(y(z)^2-x(z)^2) chi/z^2

with the initial condition

y(z0) == x(z0)

where

x(z_) := -0.226679 E^(-0.991987 z) - 0.226679 E^(-0.991987 z) + 0.43999 E^(-0.965985 z);
chi = 5.5 10^12;
z0 = 20;

I know that the solution, i.e., y(z) should look like:
enter image description here

But instead of this, I got the next solution with Wolfram Mathematica (WM) using NDSolve:

enter image description here

My WM code is:

x(z_) := -0.226679 E^(-0.991987 z) - 0.226679 E^(-0.991987 z) + 
   0.43999 E^(-0.965985 z);
chi = 5.5 10^12;
z0 = 20;
solution = 
  NDSolve({ y'(z) == -(y(z)^2 - x(z)^2) chi/z^2, y(z0) == x(z0)}, 
   y, {z, 10, 100}, 
   Method -> {"EquationSimplification" -> "Residual"});
LogLogPlot({Legended(Evaluate(y(z) /. solution), 
   Placed(StyleForm("y", FontSize -> 12), {.7, .8})), 
  Legended(yxeq(z), 
   Placed(StyleForm("x", FontSize -> 12), {.7, .8}))}, {z, 100/7, 
  100}, PlotStyle -> {{Thickness(.004), Red}, {Thickness(.004), 
    Dashed, Purple}}, FrameLabel -> {"z", "y, x"}, 
 AspectRatio -> 0.95, 
 PlotRange -> {{100/7, 100}, {0.2 10^-11, 4 10^-7}}, Frame -> True, 
 PlotStyle -> Thick, 
 FrameTicksStyle -> 
  Directive(FontSize -> 12, FontWeight -> Plain, FontColor -> Black), 
 LabelStyle -> 
  Directive(FontSize -> 12, FontWeight -> Plain, FontColor -> Black), 
 AspectRatio -> 0.95)

I do not understand why my solution is getting unstable. Could you help me with this issue?

calculus – Chain rule when taking non-dimensionalising an ODE

I have a silly question. So let’s say we have:

$frac{d^{2}x}{dt^{2}} = kx$

Now let’s say we pick $X = frac{x}{x_{c}}$ and $T = frac{t}{t_{c}}$. What I don’t understand is, if we plug in $Xx_{c}$ for x, and $Tt_{c}$ for t, how come we get:

$frac{x_{c}d^{2}X}{t_{c}^{2}dT}$.

How come the $t_{c}$ is squared? Can someone do the math and explain it to me? Our professo r just said. it was. chain rule but I am not sure how

differential equations – NDsolve on ODE returns “non-numerical value for a derivative at t == 0.`.”

The input is:

>NDSolve({a'(t) == -I (-0.823 + 0.000005*2*Abs ((b(t)))) a(t) - a(t)*0.04 /2, 
  b'(t) == -I (b(t)*(-0.823) + 0.000005*Re (a(t)))^2 - a(t)*0.09/2, 
  a(0) == b(0) == 0.1}, {a, b}, {t, 0, 200})

`NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0. 

Even I change {t,0,200} to {t,10,200} it says the same, which really confuses me.

I can solve it successfully with matlab using “OED45” fuc but almost identical expressions fails on mathematica. I am new to this language and I guess it’s the grammar problem because of the appearance of complex numbers maybe?

ordinary differential equations – Prove the an ODE has only the zero solution.

I have the ODE $$dot{x}(t)=f(x(t))$$
$$x(0)=0$$
where the dot means derivative with respect to $t$
and $f$ is an odd function and satisfies a Lipschitz condition.

Prove that the ODE has only the zero solution.

First I tried to show that $0$ is indeed a solution.

Since $f$ is odd then $$f(-x)=-f(x)$$ then $$f(0)=0$$
so $0$ satisfies the ODE.

Next I was thinking of proving the uniqueness, and I supposed there are two solutions, say $v, w$ but I couldn’t come up with something.

How can I show this?

Second order ODE with Jacobi elliptic function coefficients

I posted this last week on the Mathematics Stack Exchange but have not been able to get an answer. I have read the rules and couldn’t find anything against this, but please remove this question if this is against the rules.

I have recently got stuck on this ODE in my studies of rogue waves on elliptic backgrounds:

$$
y” + q(x) y’ + w(x) y = 0
$$

where
$$
q(x) = m frac{sn(x|m),cn(x|m)}{dn(x|m)}, \
w(x) = left(lambda^2 + dn(x|m)^2 – i m lambda frac{sn(x|m),cn(x|m)}{dn(x|m)} right)
$$

The parameter $lambda in mathbb{C}$ and $m in (0,1)$ is the elliptic parameter of the Jacobi elliptic functions $text{dn}(.|.), , text{cn}(.|.)$ and $text{sn}(.|.)$. I am only interested in $x in mathbb{R}$.

Note that (according to Mathematica), the period of $q(x)$ is $4K(m)$ where $K$ is the complete elliptic integral of the first kind. The real and imaginary parts of $w(x)$ have the same period as $q(x)$.

The initial value problem:
$$
y(0) = 2isin(alpha),\
y'(0) = 2(lambda i sin(alpha) + i cos(beta))
$$

where $alpha, beta in mathbb{C}$ are some parameters that depend on $lambda$ in some complicated way.

Are there any specific tricks to help me find an analytical solution for this ODE? Does anyone have any pointers? I have checked a few handbooks on Jacobi elliptic functions but haven’t had much luck, I have no formal training in elliptic functions and not too much in ODEs.

I have solved it numerically but I’m wondering if it’s possible to solve it analytically for completeness.

EDIT: I have taken a look at this paper but it’s a little too complicated for me. However, based on the transformation they present in equation 15:

$$
y(x) = expleft(-frac{1}{2}int q(x) dxright) u(x)
$$

we can reduce the first equation to:
$$
u”(x) – r(x) u(x) = 0
$$

where
$$
r(x) = frac{1}{2} q'(x) + frac{1}{4} q^2(x) – w(x)
$$

According to Mathematica:
$$
r(x) = frac{3 (m-1)+text{dn}(x|m) left(-text{dn}(x|m) left(3 text{dn}(x|m)^2+4 lambda ^2+m-2right)+4 i m text{cn}(x|m) text{sn}(x|m)right)}{4 text{dn}(x|m)^2}
$$

differential equations – Analytical solution for ODE with a power-law term?

I want to solve the following differential equation which is a very common growth law model in biology — a generalization of the logistic equation. In this case, the equation possesses a power-law factor 3/4.

$$frac{dx}{dt}= 4 A k left(frac{x(t)}{A}right)^{3/4}-3 k x(t)$$

The problem is to obtain the analytical solution for a certain initial condition
$x(t)=B_0$, where $A$ and $k$ and $B_0$ are positive constants.

I evaluated

DSolve({x'(t) == -2 k x(t) + 3 A k (x(t)/A)^(2/3), x(0) == B}, x, t)

and obtained four solutions. It is difficult for me to interpret the solutions.

I am interested in solving for an arbitrary initial condition, X(0)=B y A (without giving a particular value)

I get the following message:

Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

How can I solve this differential equation using Mathematica? What more can be done with Mathematica?

differential equations – How can I obtain an analytical solution for ODE with a power law term?

I want to solve the following differential equation, this equation is very common in growth laws
in Biology as the generalized logistic equation. In this case, the equation possesses a power-law factor 3/4.

begin{align}
frac{dx}{dt}= 4 A k left(frac{x(t)}{A}right)^{3/4}-3 k x(t)
end{align}

The problem is to obtain the analytical solution for a certain initial condition
$x(t)=B_0$, where $A$ and $k$ and $B_0$ are positive constants.

I use the following command,

DSolve({x'(t) == -2 k x(t) + 3 A k (x(t)/A)^(2/3), x(0) == B}, x, t)

Using this command I obtained four solutions, It is difficult for me to interpret the solutions.
I am interested in solving for an arbitrary initial condition, X(0)=B y A (without giving a particular value)

Mathematica gives the following message

Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

How can I solve this differential equation using Mathematica? What more you can do with Mathematica?

ordinary differential equations – How many solution families can an n-th order ODE have?

I observe that $dy/dx = y^2 + x^2$ can be interpreted as an $mathbb{R^3}$ paraboloid, $z = y^2 + x^2$. By projecting this paraboloid onto the $x,y$ plane we get isoclines which are necessarily non-intersecting. Non-intersecting isoclines create an unambiguous, well-behaved slope field such that the solutions passing through this slope field are non-intersecting as well. Given that solutions are non-intersecting, they belong to a single solution family. Given that the slope field determines the shape of the solution, and granted that it is unambiguous, no other solution family exists.

My conjecture is that an $n$-th order ODE has a maximum number of $n$ solution families.