# Math Help - DE Marathon

1. Originally Posted by Chris L T521
Here's an interesting problem:

A mass $m=1$ is attached to a spring with constant $k=4$; there is no dashpot. The mass is released
from rest with $x(0)=3$. At the instant $t=2\pi$ the mass is struck with a hammer, providing
an impulse $p=8$. Determine the motion of the mass.
$\frac{d^2x}{dt^2}+4x=8\delta(t-2\pi), \\\ x(0)=3, \\\ \frac{dx}{dt}\bigg|_{x=0}=0$

Now taking the Laplace transform we get

$s^2X-s(3)+4X=8e^{-2\pi s} \iff (s^2+4)X=3s+8e^{-2\pi s}$

$X=\frac{3}{2}\left( \frac{2}{s^2+4}\right)+4e^{-2\pi s}\left( \frac{2}{s^2+4}\right)$

Now we take the inverse laplace transfrom to get

$x(t)=\frac{3}{2}\sin(2t)+4\mathcal{U}(t-2\pi)\sin(2[t-2\pi])=\frac{3}{2}\sin(2t)+4\mathcal{U}(t-2\pi)\sin(2t)$

2. Excellent. I got something similar to that. You can post your question now if you have one.

3. Originally Posted by Chris L T521
Excellent. I got something similar to that. You can post your question now if you have one.
Okay this is similiar to the one above. I think this is a cool problem

$\frac{d^2x}{dt^2}+0.4\frac{dx}{dt}+9.04x=6e^{-\frac{t}{5}}\cos(3t), \\\ x(0)=x'(0)=0$

4. Originally Posted by TheEmptySet
Okay this is similiar to the one above. I think this is a cool problem

$\frac{d^2x}{dt^2}+0.4\frac{dx}{dt}+9.04x=6e^{-\frac{t}{5}}\cos(3t), \\\ x(0)=x'(0)=0$
Taking the Laplace Transform of both sides, we get:

$s^2X+.4(sX)+9.04X=6\left.\frac{s}{9+s^2}\right|_{s \to{.2+s}}\implies (s^2+.4s+9.04)X=6\frac{.2+s}{9+\left(.2+s\right)^2 }$

Therefore, $X=6\frac{.2+s}{(s^2+.4s+9.04)(9+(.2+s)^2)}$

Taking the Inverse Laplace Transform, we have the following:

\begin{aligned}
x(t)&=\mathcal{L}^{-1}\left\{\frac{1}{(s^2+.4s+.04)+9.04-.04}\cdot 6\frac{.2+s}{9+(.2+s)^2}\right\} \\
&=\mathcal{L}^{-1}\left\{\frac{1}{(s+.2)^2+9}\cdot 6\frac{s+.2}{(s+.2)^2+9}\right\} \\
&=\mathcal{L}^{-1}\left\{\left.\frac{1}{s^2+9}\right|_{s\to{s+.2}} \cdot\left.\frac{6s}{s^2+9}\right|_{s\to{s+.2}}\ri ght\}
\end{aligned}

Thus, we see that $x(t)=\frac{1}{3}e^{-\frac{t}{5}}\sin(3t)*6e^{-\frac{t}{5}}\cos(3t)$

Thus, $\frac{1}{3}e^{-\frac{t}{5}}\sin(3t)*6e^{-\frac{t}{5}}\cos(3t)=\int_0^t \left(\frac{1}{3}e^{-\frac{1}{5}\tau}\sin(3\tau)\right)\left(6e^{-\frac{1}{5}(t-\tau)}\cos(3(t-\tau))\right)\,d\tau$

$=2\int_0^t\bigg[e^{-\frac{1}{5}t}\sin(3\tau)\cos(3t-3\tau)\bigg]\,d\tau$

Using the identity $\sin(\vartheta)\cos(\varphi)=\frac{1}{2}\left[\sin(\vartheta+\varphi)+\sin(\vartheta-\varphi)\right]$, we rewrite the integrand as

$e^{-\frac{t}{5}}\int_0^t \left[\sin(3t)+\sin(6\tau-3t)\right]\,d\tau=e^{-\frac{t}{5}}\left.\left[\frac{6}{12}\left(\tau\sin(3t)-\cos(6\tau-3t)\right)\right]\right|_0^t$

$=e^{-\frac{t}{5}}\left(t\sin(3t)\right)=te^{-\frac{t}{5}}\sin(3t)$

Thus, $\color{red}\boxed{x(t)=te^{-\frac{t}{5}}\sin(3t)}$

Cool problem

--Chris

5. Here is another way to do this. Complete the square on the first term in the denominator to get

$
X=6\frac{.2+s}{(s^2+.4s+9.04)(9+(.2+s)^2)}=6 \left( \frac{s+\frac{1}{5}}{[(s+\frac{1}{5})^2+9]^2}\right)
$

Let $F(s)=\frac{s}{(s^2+9)^2} \implies F\left(s+\frac{1}{5} \right)=\left( \frac{s+\frac{1}{5}}{[(s+\frac{1}{5})^2+9]^2}\right)$

Note that $F(s)=(-1)\left( \frac{1}{2}\right)\frac{d}{ds}\left( \frac{1}{s^2+9}\right)$

So now...

$\mathcal{L}^{-1} \left\{6\cdot F\left( s+\frac{1}{5}\right) \right\}=6\cdot e^{-\frac{1}{5}} \mathcal{L}^{-1} \{F(s)\}=e^{-\frac{1}{5}t}t\sin(3t)$

6. Originally Posted by TheEmptySet
Here is another way to do this. Complete the square on the first term in the denominator to get

$
X=6\frac{.2+s}{(s^2+.4s+9.04)(9+(.2+s)^2)}=6 \left( \frac{s+\frac{1}{5}}{[(s+\frac{1}{5})^2+9]^2}\right)
$

Let $F(s)=\frac{s}{(s^2+9)^2} \implies F\left(s+\frac{1}{5} \right)=\left( \frac{s+\frac{1}{5}}{[(s+\frac{1}{5})^2+9]^2}\right)$

Note that $F(s)=(-1)\left( \frac{1}{2}\right)\frac{d}{ds}\left( \frac{1}{s^2+9}\right)$

So now...

$\mathcal{L}^{-1} \left\{6\cdot F\left( s+\frac{1}{5}\right) \right\}=6\cdot e^{-\frac{1}{5}} \mathcal{L}^{-1} \{F(s)\}=e^{-\frac{1}{5}t}t\sin(3t)$

Shoot...I totally forgot this way. You're way seems easier. Anyway, It was a good problem.

7. Instead of ODEs, why not try a PDE?

Find the general solution to the boundary value problem for the 1-D Wave Equation:

$\frac{\partial^2y}{\partial^2t}=a^2\frac{\partial^ 2y}{\partial^2x}$

$y(0,t)=y(L,t)=0; \ (00)$

$y(x,0)=f(x) \ (0

$y_t(x,0)=g(x) \ (0

where $y(x,t)$ is the displacement function of a vibrating string with fixed ends, $f(x)$ is the initial position function, and $g(x)$ is the initial velocity function.

Show all steps.

8. Originally Posted by Chris L T521
Mathstud's Limit Marathon has inspired me to start a Differential Equation Marathon. It will have similar rules : "after someone completes a DE and gets the OK from the DE's poster, he/she posts their own DE."

There are no restrictions on how you may solve them. But please show all the steps that led you to your solution.

Here's an easy one:

Solve $\bigg(e^x\sin(y)+\tan(y)\bigg)\,dx+\bigg(e^x\cos(y )+x\sec^2(y)\bigg)\,dy=0$
I think solution is quite simple if we invoke concept of total derivatives
siny(e^x)(dx) +(e^x)(cosydy)+ (tany)(dx) + (x)(sec^2(y))dy
d((e^x)siny) + d(xtanx) = 0
On integrating,we get
(e^x)siny + xtanx = c

9. Originally Posted by Chris L T521
Instead of ODEs, why not try a PDE?

Find the general solution to the boundary value problem for the 1-D Wave Equation:

$\frac{\partial^2y}{\partial^2t}=a^2\frac{\partial^ 2y}{\partial^2x}$

$y(0,t)=y(L,t)=0; \ (00)$

$y(x,0)=f(x) \ (0

$y_t(x,0)=g(x) \ (0

where $y(x,t)$ is the displacement function of a vibrating string with fixed ends, $f(x)$ is the initial position function, and $g(x)$ is the initial velocity function.

Show all steps.
The best way to solve this would be to set up two boundary value problems [where each one has one nonhomogeneous condition], and then solve the problems using the technique of Separation of Variables:

\begin{array}{cc}\text{Problem A} & \text{Problem B}\\

\begin{aligned} y_{tt}&=a^2y_{xx}\\
y(0,t)&=y(L,t)=0 \\
y(x,0)&=f(x)\\
y_t(x,0)&=0\end{aligned} & \begin{aligned} y_{tt}&=a^2y_{xx}\\
y(0,t)&=y(L,t)=0 \\
y(x,0)&=0\\
y_t(x,0)&=g(x)\end{aligned}\end{array}

Problem A:

If we let $y(x,t)=X(x)T(t)$, then the PDE becomes:

$XT''=a^2X''T$

Now separate the variables:

$\frac{X''}{X}=\frac{T''}{a^2T}$

The two functions $\frac{X''}{X}$ and $\frac{T''}{a^2T}$ agree $\forall x,t$ if they both are equal to the same constant. We now let :

$\frac{X''}{X}=\frac{T''}{a^2T}=-\lambda$

What we now have is an eigenvalue problem. We can now solve two ordinary DEs:

\begin{aligned} X''+\lambda X&=0 \\ T''+\lambda a^2T&=0\end{aligned}

Since the endpoint conditions $y(0,t)=X(0)T(t)=0$ and $y(L,t)=X(L)T(t)=0$ require that $X(0)=X(L)=0$ if $T(t)$ is non-trivial. Thus, $X(x)$ must satisfy the eigenvalue problem

$X''+\lambda X=0, ~~~X(0)=X(L)=0$

If $\lambda=0$, then the eivenvalue problem becomes:

$X''=0$

When solved, the general solution is $X=Ax+B$. When we apply the endpoint conditions, we have $A=B=0$. This gives us the trivial solution $X(x)\equiv 0$. Thus, $\lambda=0$ is NOT an eigenvalue.

If $\lambda<0$, we will let $\lambda=-\alpha^2 \ (a>0)$. The eigenvalue problem now becomes:

$X''-\alpha^2X=0$

When solved, the general solution is:

$X=c_1e^{\alpha x}+c_2e^{-\alpha x}=A\cosh(\alpha x)+B\sinh(\alpha x); ~ (A=c_1+c_2, ~ B=c_1-c_2)$

where

\begin{aligned} \cosh(\alpha x)&=\frac{1}{2}\left(e^{\alpha x}+e^{-\alpha x}\right) \\ \sinh(\alpha x)&=\frac{1}{2}\left(e^{\alpha x}-e^{-\alpha x}\right)\end{aligned}

Applying the endpoint condition $X(0)=0$, we have $X(0)=A\cosh(0)+B\sinh(0)=A=0$ so that $X(x)=B\sinh(\alpha x)$. When we apply the other endpoint $X(L)=0$, we have $X(L)=B\sinh(\alpha x)=0$. Thus, $B=0$ since $\alpha \neq 0$ and $\sinh(\alpha x)=0$ for $x=0$. Thus the only solution is the trivial solution $X(x)\equiv 0$. As a result, there are no negative eigenvalues.

Now, when $\lambda>0$, we let $\lambda=\alpha^2,~(\alpha>0)$. The eigenvalue problem then becomes:

$X''+\alpha^2X=0$

The general solution has the form:

$X=A\cos(\alpha x)+B\sin(\alpha x)$

Applying the endpoint condition $X(0)=0$, we have $X(0)=A\cos(0)+B\sin(0)=A=0$ so that $X(x)=B\sin(\alpha x)$. But if we apply the other condition $X(L)=0$, we have $X(L)=B\sin(\alpha L)$. This can occur when $B\neq 0$ when $\alpha L$ is a postive multiple of $\pi$:

$\pi,~2\pi,~3\pi,...,~n\pi~~~~\left(n\in\mathbb{Z}^ +\right)$

Therefore

$\alpha L=\pi,~2\pi,~3\pi,...,~n\pi$

Solving for $\alpha$, we get:

$\alpha=\frac{\pi}{L},~\frac{2\pi}{L},~\frac{3\pi}{ L},...,~\frac{n\pi}{L}$

Since $\lambda=\alpha^2$, we can say that:

$\lambda=\frac{\pi^2}{L^2},~\frac{4\pi^2}{L^2},~\fr ac{9\pi^2}{L^2},...,~\frac{n^2\pi^2}{L^2}$

We now can see that we have an infinte sequence of eigenvalues defined by:

$\lambda_n=\frac{n^2\pi^2}{L^2}~~~~\left(n\in\mathb b{Z}^+\right)$

The associated eigenfunction is

$X_n=\sin\left(\frac{n\pi}{L}\right),~~~~\left(n\in \mathbb{Z}^+\right)$

-------
***

The homogeneous initial condition

$y_t(x,0)=X(x)T'(0)=0$

Implies that $T'(0)=0$. Thus, the solution $T_n(t)$ that is associated with the eigenvalue $\lambda_n=\frac{n^2\pi^2}{L^2}$ must also satisfy the conditions

$T_n\!''+\frac{n^2\pi^2a^2}{L^2}T_n=0,~~~T_n\!'(0)= 0$

After some calculations [which I have omitted], we get the general solution:

$T_n(t)=A_n\cos\left(\frac{n\pi at}{L}\right)+B_n\sin\left(\frac{n\pi at}{L}\right)$

To apply the condition, we need to find $T_n\!'(t)$:

\begin{aligned}T_n\!'(t)&=-A_n\frac{n\pi a}{L}\sin\left(\frac{n\pi at}{L}\right)+B_n\frac{n\pi a}{L}\cos\left(\frac{n\pi at}{L}\right) \\ &=\frac{n\pi a}{L}\bigg[-A_n\sin\left(\frac{n\pi at}{L}\right)+B_n\cos\left(\frac{n\pi at}{L}\right)\bigg]\end{aligned}

Applying the condition $T'(0)=0$, we get:

$T_n\!'(0)=\frac{n\pi a}{L}\bigg[-A_n\sin(0)+B_n\cos(0)\bigg]=B_n\frac{n\pi a}{L}=0$

Therefore, $B_n=0$. Thus, $T_n(t)$ can be defined as the non-trivial solution

$T_n(t)=\cos\left(\frac{n\pi a}{L}\right)$

Since $y(x,t)=X(x)T(x)$, we can say that

$y_n(x,t)=X_n(x)T_n(t)=\sin\bigg(\frac{n\pi x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg),~~~~n\in\mathbb{Z}^+$

Each of these terms satisfy the wave equation $\frac{\partial^2y}{\partial t^2}=a^2\frac{\partial^2y}{\partial x^2}$ and the homogeneous boundary condition given at the start of this part of the problem. Thus, by the principle of superposition, we define $y_n(x,t)$ as the inifinte series:

$y_n(x,t)=\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\p i x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg)$

All we need to do now is find $\left\{A_n\right\}$ such that it satisfies the nonhomogeneous condition

$y(x,0)=\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\pi x}{L}\bigg)=f(x)$

for $0. However, this will be the Fourier Sine Series of $f(x)$ if we choose

$A_n=\frac{2}{L}\int_0^L f(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx$

Therefore, the Formal Series Solution to Problem A is

$y(x,t)=\sum_{n=1}^{\infty}A_n\sin\bigg(\frac{n\pi x}{L}\bigg)\cos\bigg(\frac{n\pi at}{L}\bigg)$

where

$A_n=\frac{2}{L}\int_0^L f(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx$

----------------------------------------------

Problem B

Let us start from ***:

The homogeneous intial condition

$y(x,0)=X(x)T(0)=0$

implies that $T(0)=0$. Thus, the solution $T_n(t)$ associated with the eigenvalue $\lambda_n=\frac{n^2\pi^2}{L^2}$ must also satisfy the conditions

$T_n\!''+\frac{n^2\pi^2a^2t^2}{L^2}T_n=0,~~~T_n(0)= 0$

After some calculations [which I have omitted again...], the general solution takes the form

$T_n(t)=A_n\cos\bigg(\frac{n\pi at}{L}\bigg)+B_n\sin\bigg(\frac{n\pi at}{L}\bigg)$

Applying the initial condition, we get

$T_n=A_n=0$

Thus, $T_n(t)$ can be defined as the non-trivial solution

$T_n(t)=\sin\bigg(\frac{n\pi at}{L}\bigg)$

Since $y(x,t)=X(x)T(t)$, we can say that

$y_n(x,t)=X(x)T(t)=\sin\bigg(\frac{n\pi at}{L}\bigg)\sin\bigg(\frac{n\pi x}{L}\bigg)$

Each of these terms satisfy the wave equation $\frac{\partial^2y}{\partial t^2}=a^2\frac{\partial^2y}{\partial x^2}$ and the homogeneous boundary condition given at the start of this part of the problem. Thus, by the principle of superposition, we define $y_n(x,t)$ as the inifinte series:

$y_n(x,t)=\sum_{n=1}^{\infty}B_n\sin\bigg(\frac{n\p i x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)$

Find $y_t(x,y)$:

$y_t(x,t)=\sum_{n=1}^{\infty}B_n\frac{n\pi a}{L}\cos\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)$

All we need to do now is find $\left\{B_n\right\}$ such that it satisfies the nonhomogeneous condition

$y_t(x,0)=\sum_{n=1}^{\infty}B_n\frac{n\pi a}{L}\cos\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)=g(x)$

for $0. However, this will be the Fourier Sine Series of $g(x)$ if we choose

$B_n\frac{n\pi a}{L}=\frac{2}{L}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx\implies B_n=\frac{2}{n\pi a}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx$

Therefore, the Formal Series Solution to Problem B is

$y(x,t)=\sum_{n=1}^{\infty}B_n\sin\bigg(\frac{n\pi x}{L}\bigg)\sin\bigg(\frac{n\pi at}{L}\bigg)$

where

$B_n=\frac{2}{n\pi a}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx$

-------------

Thus, the Formal Series Solution to the One Dimensional Wave Equation is

\color{red}\boxed{\begin{aligned}y(x,t)&=\sum_{n=1 }^{\infty}\bigg[A_n\cos\bigg(\frac{n\pi a}{L}t\bigg)+B_n\sin\bigg(\frac{n\pi a}{L}t\bigg)\bigg]\sin\bigg(\frac{n\pi}{L}x\bigg)\\ \text{where} \\
A_n&=\frac{2}{L}\int_0^L f(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx \\
B_n&=\frac{2}{n\pi a}\int_0^L g(x)\sin\bigg(\frac{n\pi x}{L}\bigg)\,dx\end{aligned}}

That was a lot of work...

--Chris

10. Originally Posted by TheEmptySet
Okay this is similiar to the one above. I think this is a cool problem

$\frac{d^2x}{dt^2}+0.4\frac{dx}{dt}+9.04x=6e^{-\frac{t}{5}}\cos(3t), \\\ x(0)=x'(0)=0$

here's my suggestion - easy and simple

x''+0,4x'+9,4x = 3e^(-t/5)cos(3t)

ok, x_h is easy so I'll omit it

for x_p, we have to go from R to C and I'll use the differential operator
D = d/dt

x''+0,4x'+9,4x = 3e^(-t/5)*е^(3it)

(D^2 + 0,4D + 9,4)x = 3e^([3i-1/5]t) and let p(D) be the char. polynomial

p(D)x = 3e^([3i-1/5]t)

so, going back to R, a particular solution is:

x_p = Re{ 3([3i-1/5]t)/p(3i-1/5) } , where p(3i-1/5) is not 0, atherwise it's: x_p = Re{ 3t([3i-1/5]t)/p'(3i-1/5) }

then the well-known procedure - finding the general solution and the 2 constants

11. Originally Posted by Chris L T521
That was a lot of work...
Another equation is here.

Have you ever learned Sturm-Liouville Theory? (It is about eigenvalues and eigenfunctions of a boundary value problem).

12. Originally Posted by ThePerfectHacker
Another equation is here.

Have you ever learned Sturm-Liouville Theory? (It is about eigenvalues and eigenfunctions of a boundary value problem).
No I haven't. I plan on learning it on my own when I find the time. If I don't learn it, I'm taking a class in the spring on the last part of Diff Equ [Laplace Trans, Fourier Series and Transforms, Power Series, Sturm-Liouville and other topics]...

If I did know how to apply Sturm-Liouville Theory, by how much would the amount of work needed to solve this equation reduce?

--Chris

Page 2 of 2 First 12