# Test is coming

### Test is coming

Please check this (easy) diff. equation for me.
I have made the laplace transform and got $$\frac{1}{s^2+1}\cdot\frac{1}{s}\cdot\tanh(s*\pi/2)$$
Attachments reddit.PNG (5.66 KiB) Viewed 274 times
Guest

### Re: Test is coming

What, exactly, was the question? To find the Laplace transform of y? It's simpler to solve the differential equation without using the Laplace transform.
Guest

### Re: Test is coming

The characteristic equation is $$r^2= 1$$ which has solutions r= i and r= -I. So the general solution to the differential equation is $$y(t)= C_1cos(t)+ C_2sin(t)$$. To find a solution to the entire equation using "variation of parameters", we seek a solution of the form $$y(t)= u(t)cos(t)+ v(t)sin(t)$$. Then [tex[y'(t)= u'(t)cos(t)- u(t)sin(t)+ v'(t)sin(t)+ v(t)cos(t)[/tex]. There are, in fact, infinitely many solutions of that form so to "narrow the search" and simplify, we assume that $$u'(t)cos(t)+ v'(t)sin(t)= 0$$. In that case, $$y'(t)= -u(t)sin(t)+ v(t)cos(t)$$. Differentiating again, $$y''(t)= -u''(t)sin(t)- u(t)cos(t)+ v'(t)cos(t)- v(t)sin(t)$$ so that $$y''+ y= -u'(t)sin(t)- u(t)cos(t)+ v'(t)cos(t)- v(t)sin(t)+ u(t)cos(t)+ v(t)sin(t)= -u'(t)sin(t)+ v'(t)cos(t)= f(t)$$.

We have the two equations $$u'(t)cos(t)+ v'(t)sin(t)= 0$$ and $$-u'(tt)sin(t)+ v'(t)cos(t)= f(t)$$. Treat those as two linear equations to solve for u' and v'. Multiply the first equation by sin(t) to get $$u'(t)cos(t)sin(t)+ v'(t)sin^2(t)= 0$$, multiply the second equation by cos(t) to get $$-u(t)sin(t)cos(t)+ v'(t)cos^2(t)= f(t)cos(t).$$ Adding eliminates u'(t): $$v'(t)(sin^2(t)+ cos^2(t))= v'(t)= f(t)cos(t)$$. Integrate f(t)cos(t) to get v(t). Similarly, multiplying the first equation by cos(t) gives $$u'cos^2(t)+ v'sin(t)cos(t)= 0$$ and the multiplying the second equation by sin(t) gives $$-u'(t)sin^2(t)+ v'(t)sin(t)cos(t)= f(t)sin(t)$$ Subtracting the second of those equations from the first, $$u'(t)= -f(t) sin(t)$$. Integrate that to get u(t).

To do those integrals, since f(t) is defined "piecewise" you will have to integrate by "pieces". For example for t between 0 and $$\pi$$, f(t)= -1 so $$u'(t)= sin(t)$$ and $$u(t)= -cos(t)$$ while $$v'(t)= -cos(t)$$ so $$v(t)= sin(t)$$ (since we just want one out of infinitely many solutions, we can take the "constants of integration" to be 0). So for x between 0 and $$\pi$$, $$y(t)= C_1cos(t)+ C_2sin(t)- cos^2(t)+ sin^2(t)$$. Also $$y'(t)= -C_1sin(t)+ C_2 cos(t)+ 4cos(t)sin(t).$$ Using the initial conditions, $$y(0)= C_1- 1= 0\ so\ y(0)= 1\ and\ y'(0)= C_2= 0.$$ For t between 0 and $$\pi$$, $$y(t)=cos(t)- cos^2(t)+ sin^2(t)$$.

Now do the same for t between $$\pi$$ and $$2\pi$$ with f(x)= 1. Use the values from the first solution at $$x= \pi$$ as initial conditions.
Guest

Return to Differential Equations

### Who is online

Users browsing this forum: No registered users and 1 guest