help on test

twillis09

New member
Joined
Jun 24, 2011
Messages
1
Solve the 1st order differential equation: y^(1)+4y=cos(x) with intial condition y(?/3)=1
 
twillis09 said:
Solve the 1st order differential equation: y^(1)+4y=cos(x) with intial condition y(?/3)=1

I interpret this as a first order non-homogeneous ODE.

If that is correct - then where are you stuck?

Please share your work with us, indicating exactly where you are stuck - so that we may know where to begin to help you.

I admire your honesty regarding admitting that this is a test - however, are you supposed to seek external help for that?
 
Solve the 1st order differential equation: y^(1)+4y=cos(x) with intial condition y(?/3)=1

\(\displaystyle y'(x) + 4y(x) = cos(x)\) can be solved in a number of ways. The simplest involves finding a u(x) such that:

\(\displaystyle \int u(x)y' + 4u(x)y\, dx = 4u(x)y(x)\)

Which basically means that we need to find a \(\displaystyle u(x)\) such that

\(\displaystyle u'(x) = 4u(x)\)

This is because by finding a u(x) to meet the above condition, we also find a u(x) to meet this condition:

\(\displaystyle \frac{d}{dx}(y(x)u(x)) = u(x)y'(x) + 4u(x)y(x)\)


So, let's solve for u(x). If \(\displaystyle u'(x) = 4u(x)\), then \(\displaystyle \frac{u'(x)}{u(x)} = 4\) and therefore:

\(\displaystyle ln(u(x)) = 4x \to u(x) = e^{4x}\)

Returning back to our initial problem \(\displaystyle y'(x) + 4y(x) = cos(x)\), let's multiply both sides by \(\displaystyle e^{4x}\):

\(\displaystyle e^{4x}y'(x) + 4e^{4x}y(x) = e^{4x}cos(x)\)

Now integrating both sides gets us:

\(\displaystyle e^{4x}y(x) = \int e^{4x}cos(x)\, dx \to y(x) = \frac{\int e^{4x}cos(x)\, dx}{e^{4x}}\)


All we need to do now is solve for \(\displaystyle \int e^{4x}cos(x)\, dx\)

This seems difficult until we recall that \(\displaystyle cos(x) = \frac{e^{ix}+e^{-ix}}{2}\) (this can be proved with the taylor series) which gives us an easier integral:

\(\displaystyle \int e^{4x}\frac{e^{ix}+e^{-ix}}{2}\, dx = \frac{1}{2}(\int e^{4x+ix}\, dx + \int e^{4x-ix}\, dx)\)

Since we know that \(\displaystyle \int e^{4x+ix}\, dx = \frac{1}{4+i}e^{4x+ix} = \frac{4-i}{17}e^{4x+ix}\) and \(\displaystyle \int e^{4x-ix}\, dx = \frac{1}{4-i}e^{4x-ix} = \frac{4+i}{17}e^{4x-ix}\), we have the solution to our original integral:

\(\displaystyle \int e^{4x}cos(x)\, dx = \frac{\frac{4-i}{17}e^{4x+ix} + \frac{4+i}{17}e^{4x-ix}}{2} + c\) \(\displaystyle = e^{4x}\frac{4e^{ix} - ie^{ix} + 4e^{-ix} + ie^{-ix}}{2\cdot17} + c = \frac{e^{4x}}{17}(4\frac{e^{ix} + e^{-ix}}{2} + \frac{ie^{-ix}-ie^{ix}}{2}) + c\)

And again if we notice that, from the taylor series, \(\displaystyle cos(x) = \frac{e^{ix}+e^{-ix}}{2}\) and \(\displaystyle sin(x) = \frac{ie^{-ix}-ie^{ix}}{2}\), we see what we actually have here is:

\(\displaystyle \frac{e^{4x}}{17}(4\frac{e^{ix} + e^{-ix}}{2} + \frac{ie^{-ix}-ie^{ix}}{2}) + c = \frac{e^{4x}}{17}(4cos(x) + sin(x)) + c \)


Now we plug that into our equation \(\displaystyle y(x) = \frac{\int e^{4x}cos(x)\, dx}{e^{4x}}\) to get:

\(\displaystyle y(x) = \frac{4cos(x) + sin(x)}{17} + ce^{-4x}\) (notice that \(\displaystyle \frac{1}{17}ce^{-4x} = ce^{-4x}\) because since c is representative of any number, c/17 has no real meaning since c/17 is also any number. It it thus "absorbed" into our unknown constant)


Hope this helped!
 
\(\displaystyle y(x) = \frac{4cos(x) + sin(x)}{17} + ce^{-4x}\)


Btw, I don't know what \(\displaystyle y(?/3)\) is, but let's solve for \(\displaystyle c\) where \(\displaystyle y(\alpha) = 1\)

\(\displaystyle y(\alpha) = \frac{4cos(\alpha) + sin(\alpha)}{17} + ce^{-4\alpha} = 1 \to\) \(\displaystyle ce^{-4\alpha} = 1 - \frac{4cos(\alpha) + sin(\alpha)}{17} \to\) \(\displaystyle c = e^{4\alpha}\frac{17-4cos(\alpha) + sin(\alpha)}{17}\)

For example, if this means anything, if \(\displaystyle y(?/3) = 1\) then \(\displaystyle c = e^{4(?/3)}\frac{17-4cos((?/3)) + sin((?/3))}{17}\)
 
Here is your answer

Here is what you need:


Integration by parts is much easier to do in terms of functions and derivatives rather than differentials, yet the above answerer has chosen the more complicated way.

Solve this differential equation by using an integrating factor:
y' + 4y = cosx
dy / dx + 4y = cosx
dy / dx + P(x)y = f(x)
P(x) = 4
f(x) = cosx
I(x) = ℮^[∫ P(x) dx]
I(x) = ℮^(∫ 4 dx)
I(x) = ℮^(4x)
I(x)y = ∫ I(x)f(x) dx
y℮^(4x) = ∫ ℮^(4x)cosx dx

Integrate the expression on the right by parts:
∫ ℮^(4x)cosx dx
Let f'(x) = cosx
f(x) = sinx
Let g(x) = ℮^(4x)
g'(x) = 4℮^(4x)
∫ f'(x)g(x) dx = f(x)g(x) - ∫ f(x)g'(x) dx
∫ ℮^(4x)cosx dx = ℮^(4x)sinx - ∫ 4℮^(4x)sinx dx
---------------------------------------…
∫ 4℮^(4x)sinx dx
Let f'(x) = sinx
f(x) = -cosx
Let g(x) = 4℮^(4x)
g'(x) = 16℮^(4x)
∫ f'(x)g(x) dx = f(x)g(x) - ∫ f(x)g'(x) dx
∫ 4℮^(4x)sinx dx = -4℮^(4x)cosx + ∫ 16℮^(4x)cosx dx
---------------------------------------…
∫ ℮^(4x)cosx dx = ℮^(4x)sinx - ∫ 4℮^(4x)sinx dx
∫ ℮^(4x)cosx dx = ℮^(4x)sinx - [-4℮^(4x)cosx + ∫ 16℮^(4x)cosx dx]
∫ ℮^(4x)cosx dx = ℮^(4x)sinx + 4℮^(4x)cosx - ∫ 16℮^(4x)cosx dx
∫ ℮^(4x)cosx dx = ℮^(4x)sinx + 4℮^(4x)cosx - 16 ∫ ℮^(4x)cosx dx
17 ∫ ℮^(4x)cosx dx = ℮^(4x)sinx + 4℮^(4x)cosx + C
17 ∫ ℮^(4x)cosx dx = ℮^(4x)(sinx + 4cosx) + C
∫ ℮^(4x)cosx dx = ℮^(4x)(sinx + 4cosx) / 17 + C
∫ ℮^(4x)cosx dx = C + ℮^(4x)(sinx + 4cosx) / 17

Continue solving using this result and find the general solution:
y℮^(4x) = ∫ ℮^(4x)cosx dx
y℮^(4x) = C + ℮^(4x)(sinx + 4cosx) / 17
y = C / ℮^(4x) + (sinx + 4cosx) / 17

Find the particular solution by solving for the constant with the initial condition:
When x = π / 3, y = 1
C / ℮^(4π / 3) + (√3 / 2 + 2) / 17 = 1
34C + (√3 + 4)℮^(4π / 3) = 34℮^(4π / 3)
34C = (30 - √3)℮^(4π / 3)
C = (30 - √3)℮^(4π / 3) / 34
y = (30 - √3)℮^(4π / 3) / 34℮^(4x) + (sinx + 4cosx) / 17
 
Last edited by a moderator:
Top