# First attempt at Diff Eq

1. Apr 12, 2005

### whozum

This is probably too hard to be the first problem I try for diff eq. I'm trying to learn this stuff. Question, whats the difference between a homogenous and nonhomogenous one? What problem does this pose in solving the problem?

I wanna try this one (jacked from Naeem's post, but I posted separately to avoid hijacking), but I know itll be wrong so here goes:

$$y \ dx + (2x - ye^y) \ dy = 0$$

$$M(x)dx + N(y)dy = 0$$

$$M(x) = y \mbox{ and } N(y) = 2x - ye^y$$

So then $M_y = 1 \mbox{ and } N_x = 2 [/tex] We need them to be the same ( why? ) so we need some factor [itex] \mu[/tex] that will make the partial derivatives [itex] M_y = N_x$.

So I'm going on a limb here:

$$M(x)_y\mu = N(y)_x\mu$$

$$\int{M(x)_y\mu}{dy} = \int{N(y)_x\mu}{dx}$$

$$\int{y\mu}{dy} = \int{(2x-ye^y)\mu}{dx}$$

Im stuck here, but I thought of this, will it work?

$$y \ dx + (2x - ye^y) \ dy = 0$$

$$(2x - ye^y) \ dy = -ydx$$

$$\ dy = \frac{-ydx}{(2x - ye^y)}$$

$$\int dy = \int \frac{y}{2x-ye^y}dx$$

$$y = y\int{\frac{1}{2x-ye^y}dx$$

$$u = 2x-ye^y \mbox{ and } du = 2 dx$$

$$y = \frac{y}{2}\int{1/u}{du}$$

$$y = \frac{ln(2x-ye^y)}{2}$$

I messed something up pretty bad, obviously my second idea didnt work. Can someone look over my first attempt and tell me how to continue? Do I treat mu as a function of x? y? both? cosntant?

2. Apr 12, 2005

### dextercioby

Nope,u can't integrate the way you did.I believe i solved this equation thrugh other method than finding an integating factor...

Daniel.

3. Apr 12, 2005

### whozum

Well I dont know ANY methods, can you tell me its name?
What exactly is the reason I cant integrate like that? Did I make amistake, or is the whole setup bad?

I tried the integrating factor because of what Data said in the post, and because I read an overview of it yesterday (as you know).

4. Apr 12, 2005

### dextercioby

U cannot integrate like u did,because the variables are not completely separated.In the RHS,u should integrate wrt "x" a function depending only of x .

Daniel.

5. Apr 12, 2005

### whozum

Is it possible in this problem to satisfy that requirement?

Also, What do I do to find mu in my first attempt?

6. Apr 12, 2005

### saltydog

Whozum,

Please, allow me to make a kind suggestion: Get a good differential equations book and start doing the problems starting from the first page. Don't jump to equations since the theory is build up. Start with the easy ones, the techniques you learn there are the foundations for the more involved ones. Personally, I feel one needs to work all the problems in one section before going to the next section. Don't jump around in the problem set. If you want to work on #10, do the first 9 first. I used Rainville and Bedient in school and found it easy to follow. We can help you here too.

7. Apr 12, 2005

### whozum

Well I read the first two pages of the Diff Eq guide stickied here, and the first page seemed like cake, and they introduce integrating factors in the second. I agree with you, but I want to do this more on the side than commit to it (thats just the way I am, I know its a terrible idea).

Is this that far into diff eq theory? Should I step back a bit?

8. Apr 12, 2005

### saltydog

No. It's not far but it takes lots (usually) of practice to get good with math and that practice is most effectively performed in an orderly progression from simple to advanced: Solving one or two problems of a specific type is not enough. Techniques are learned working with other problems of the same type. You'll miss out on this valuable resource if you just do a few problems like this and a few like that.

9. Apr 13, 2005

### whozum

Alright then. i stepped back.

successfully completed:

$$y' + 2y = 3$$

$$y' + (1/2)y = 2 + t$$

did this one, but I'm not sure if its right:

$$1.) y' + 3y = t + e^{-2t}$$ from ExtravagantDream's guide to diff eq.

Here goes:

$$p(t) = 3, g(t) = t+e^{-2t}, \mu(t) = e^{\int p(t)dt} = e^{3t}$$

$$e^{3t}y' + 3ye^{3t} = (t+e^{-2t})(e^{3t})$$
Left is the derivative of $y(t)e^{3t}[/tex]. When we integrate both sides we'll get: $$y(t)e^{3t} = e^t + \int{te^{3t}dt$$ I did this by parts with [itex]u = t, du = dt, v = e^{3t}/3, dv = e^{3t}$ and got:

$$e^{3t}y(t) = e^t+\frac{e^{3t}}{3} ( t-\frac{1}{3} )$$

Dividing through

$$y(t) = e^{-2t} - (1/9) + \frac{t}{3} + ce^{-3t}$$

10. Apr 13, 2005

### whozum

#3) Same thing

$$t^3\frac{dy}{dt} + 4t^2y = e^{-t}$$

$$\frac{dy}{dt} + \frac{4y}{t} = e^{-t}t^{-3}$$

$$\mu(t) = e^{\int p(t) dt} = e^{\int{\frac{4}{t}}dt} = e^{4ln(t)} = t^4$$

$$t^4\frac{dy}{dt} + 4t^3y = te^{-t}$$

LHS is the derivative of $y(t)t^4$ so aftre integrating:

$$y(t)t^4 = \int{te^{-t}}{dt}$$

$$u = t, du = dt, v = -e^{-t}, dv = e^{-t}dt$$

$$y(t)t^4 = \frac{-t}{e^t} - \int{-e^{-t}}{dt}$$

$$y(t)t^4 = \frac{-t}{e^t} - e^{-t}$$

$$y(t) = \frac{-1}{e^tt^3} - \frac{1}{e^tt^4} = \frac{-1}{e^tt^3}(1+\frac{1}{t})$$

11. Apr 13, 2005

### saltydog

The last integration, you didn't include a constant of integration. That changes the results. After the last integration, it should be:

$$y(t)t^4=\frac{-t}{e^4}-e^{-t}+K$$

or:

$$y(t)=-\frac{1}{t^3e^t}-\frac{1}{t^4e^t}+Ke^{-4}$$

Sometimes it's a good idea to back-substitute the solution into the ODE to check it (I didn't above) but if you have a math package, that's easy.

Everything else looks ok to me. Also, there's something about dividing by zero above, or $x^3$. The solution has a singularity there. I think it's a good idea to routinely plot the solutions to obtain a visual result that you can check against the ODE. The solution will often support assumptions, suspicions, other conclusions drawn during the analysis.

12. Apr 13, 2005

### whozum

Did you mean

$$y(t)=-\frac{1}{t^3e^t}-\frac{1}{t^4e^t}+Kt^{-4}$$ ? the last term.

Since I am dividing by t^4, there would be a singularity at t=0, how do I go about this? Avoid it? Separate the intervals?

13. Apr 13, 2005

### saltydog

Yes, I'm sorry. I do like to be as precise as possible with my math. Anyway, the singularity is exhibited as an asymptote at x=0. See attached plot. Don't avoid the singularities; it's part of the overall behavior of the solution. Learn to become comfortable with things like this.

Oh yea, for the plot I just let K=1. It's a good idea, if you want to study the solutions, just let the various constants be 0 or 1 or something else that's simple.

#### Attached Files:

• ###### ptemp.JPG
File size:
3.9 KB
Views:
69
Last edited: Apr 13, 2005
14. Apr 13, 2005

### whozum

I understand, but I'm not sure how to interpret you telling me there was a singularity. Is there anything wrong with this? Or is my solution to the DE correct? What does the singularity mean over all? I know what one is so I dont need that, but does it mean something as a DE solution

I'm very comfortable with singularities :D

15. Apr 13, 2005

### saltydog

Hum . . . a singularity. I don't think I can give a rigorous definition. Perhaps someone here can. My understanding is that a "qualitative" change occurred, from continuous to discontinuous, from finite slope to infinite slope. Also, a point is called singular when the coefficient in front of the highest derivative is zero there (as in 3 above). With non-linear equations, solutions which are not part of the general solution are called "singular solutions".

16. Apr 13, 2005

### whozum

Ok, did a few more:

Successfully completed:

$$\frac{dy}{dx} = \frac{x^2}{1-y^2} \textit{ to be } y-\frac{y^3}{3} = \frac{x^3}{3}+c$$ Should I solve this? Does it really make a difference?

$$\frac{dy}{dt} = \frac{ycos(t)}{1+2y^2} \textit{ to be } lny+y^2 = sin(t)+c$$

$$\frac{dy}{dx} = \frac{x^2}{y} \textit{ to be } y=\sqrt{2x^3/3+c}$$

These I'm not sure:

$$xdx + ye^{-x}dy = 0, y(0) = 1$$

$$x+ye^{-x}\frac{dy}{dx} = 0$$

$$ydy = -xe^xdx$$

$$\frac{y^2}{2} = -\int{xe^x}dx$$

$$u = x, du = dx, v = e^x, dv = e^xdx$$

$$\frac{y^2}{2} = -(xe^x-e^x+c) = e^x(1-x)+c$$

$$y = \sqrt{2e^x(1-x)+c}$$

$$1 = \sqrt{2e^0(1-0)+c} = \sqrt{(2(1)+c}$$

$$1 = c+2, c=-1$$

$$y=\sqrt{2e^x(1-x)-1}$$

And last one

$$y^2(1+x^2)^{\frac{1}{2}} +arcsin(x)dx$$

I assumed it was equal to 0, so I solved as well as I could:

$$y^2 = \frac{-arcsin(x)dx}{(1+x^2)^{\frac{1}{2}}}$$

Theres a dy missing, I don't think I can just drop one in there from nowhere, and I couldnt see any ways to induce one into the equation. If I multiplied through by dy, I could integrate both sides, the RHS with an iterated integral by Fubini's thm, but I thought that was a stretch for this kind of problem.

Either way, the integration of the RHS doesnt look easy. Can someone give me some feedback? Thanks alot.

Last edited: Apr 13, 2005
17. Apr 14, 2005

### whozum

Can anyone look at these? I showed the last one to a friend of mine and he said that it isnt even a DE.

18. Apr 15, 2005

### dextercioby

In case it was a typo and the "dy" was missing,then u can be sure that

$$\int \frac{\arcsin x}{\sqrt{1+x^{2}}} \ dx$$ is given by the following picture

Daniel.

#### Attached Files:

• ###### Integrate.gif
File size:
7.1 KB
Views:
77
19. Apr 15, 2005

### whozum

Is it then safe to assume that that wasnt the intended problem? I don't think a textbook would assign a problem with that solution when introducing DE.

20. Apr 15, 2005

Perhaps.

Daniel.