# Homework Help: Linear Differential Equation with a substitution.

1. Sep 30, 2008

### Rake-MC

Wow I am so very bad at differential equations.. :(

The problem

Here is the exact problem I'm given: http://img229.imageshack.us/img229/9025/10640260bs5.jpg [Broken]

attempt at a solution

I'm guessing that I need to differentiate y(x) that I am given and substitute that into the left hand side and then put the y function [sinx + 1/u(x)] as y in the right hand side (y^2).
Then re-arrange for u(x) and differentiate to get du/dx and hopefully it will be the third given equation.

After that I think I just have to solve that ODE and get it back in terms of y.

Assuming that is what I have to do, sadly I cannot even get that far..

differentiating y(x) = sinx + 1/u(x)
must this be done implicitly? I get confused as u(x) is a function and not a variable.

I can see that the third equation must be solved linearly such that dy/dx + utan(x) = -1/2 sec(x)

And I (think) that I solved the integrating factor to be 1/cos(x).

But I am so bad at differential equations and the sources on the internet seem to be so confusing that I'm quite stuck from here but this is what I have:

(1/cos(x))*du/dx + u*(1/cos(x))*tan(x) = -(1/2)*(1/cos(x))*sec(x)=d/dx(u/cos(x)) <- multiplying by integrating factor and copying form of examples from the net

u/cos(x) = integral of -(1/2)*(1/cos(x))*sec(x)

and I know I'm way off here so I think I might aswell just stop...

Also it would be great if someone could point me in the direction of a site that shows how to type all those math symbols such as the integral sign.

Last edited by a moderator: May 3, 2017
2. Sep 30, 2008

### CompuChip

Good guess

I don't know what you call "implicitly" but I don't think so. All you need is the chain rule:
$$\frac{d}{dx} \frac{1}{u(x)} = \frac{d (1/u)}{du} \frac{du}{dx}$$

3. Sep 30, 2008

### Rake-MC

Thanks CompuChip.

For dy/dx I got cos(x) - 1/u^2

so that's on the left side, for the right side I subbed in sin(x) + 1/u

but it just gets really messy, and I can't get u on its own.. This is probably one of the most simple things to do but I just can't do it.

Maybe I should drop out of engineering.....

4. Sep 30, 2008

### CompuChip

You still forgot the chain rule:

dy/dx = cos(x) - u' / u^2,
where u' denotes differentation of u w.r.t. x.
And you don't want u on its own, but du/dx = u'.

5. Sep 30, 2008

### Rake-MC

Thanks tons!
I can't show how grateful I am for being so patient with me. I am so slow with this kind of thing..

Now I'm 99% sure I have to do a linear differential equation to get the solution, but doing that will probably result in colossal failure on my part.
As I said earlier I'm sure the integrating factor is 1/cos(x), and I multiplied it through my differential equation such that I had it in the form of I(x)dy/dx + I(x)P(x) = Q(x)
but I don't really know what to do from here.
Sites that I've looked at seem to use terminology and symbols that are far beyond me..

6. Sep 30, 2008

### Rake-MC

Okay, linear differential equations confuse the hell out of me, but by any chance is the answer:

$$u = -\frac{1}{2} \int sec(x)sec(x)dx = -\frac{1}{2} tan(x) + C$$
$$y(x) = sin(x) + \frac{1}{u(x)}$$
$$y(x) = sin(x) - \frac{2}{tan(x)+C}$$

Did I do this right?
Cheers

7. Sep 30, 2008

### Rake-MC

Somehow I don't think that this is right, because I have dy/dx, subbed in u, took the derivative of that. Did the differential equation, but shouldn't I need to do another differential equation to reach y(x)? It confuses me because I'm given dy/dx aswell as y(x) in terms of u(x).
Thanks

8. Oct 1, 2008

### Rake-MC

Okay, I think that I have done something wrong in that it's not:
$$u = -\frac{1}{2} \int sec(x)sec(x)dx$$

but rather $$I(x)u = -\frac{1}{2} \int sec(x)sec(x)dx = -\frac{1}{2} tan(x) + C$$

where $$I(x) = sec(x)$$
so

$$u = -\frac{1}{2} tan(x)cos(x) + C$$

Then $$y(x) = sin(x) - \frac{2}{tan(x)cos(x)+C} = sin(x) - 2cot(x)sec(x)$$

If anyone could confirm this, it would be most greatly appreciated.
Cheers.

9. Oct 2, 2008

### Rake-MC

Bump thx.

10. Oct 2, 2008

### jeffreylze

Yeap, you've got it right. Just one thing, where did your constant go for the final answer? Btw, we are on the same course doing the same subject. I found the assignment really difficult esp question 3.

11. Oct 2, 2008

### Rake-MC

Cheers jeffreylze,
well my constant of integration is $$\frac{1}{cos(x)}$$

which is the $$sec(x)$$

$$sin(x) - 2cot(x)sec(x)$$