Homework Help: Basic First ODE and Separation problem

1. Dec 28, 2017

Gulfstream757

<Moderator's note: Moved from a technical forum and thus no template.>

Hi all, hope you all had a great Christmas,

I had a difficulty with theses two problems,

1. Show that y=1/x + x/2 is a solution of the differential equation,

dy/dx=1-y/x, where y=1.5 and x=2

2. Solve the differential equation, dy/dx=e^4x-y, where y=1 and x=1/4
In your final answer express y in terms of x.

For question 1 my understanding is that I should differentiate the y= function and then sub that in for dy/dx and they should equal with some algebra. My problem is when do you input the values for x and y?

For question 2 I think its a separable equation that you would separate, integrate to solve then sub in the x and y values to find the constant of integration. My issue is how to separate, I've tried to take the natural log of both sides? But im really lost

Thanks so much in advance!

Last edited by a moderator: Dec 28, 2017
2. Dec 28, 2017

Orodruin

Staff Emeritus
This is pretty bad nomenclature because y and x are not constants so it is not that you should insert this into the differential equation. Instead, it would seem that this is supposed to give the boundary condition, i.e., that y = 1.5 when x = 2. You then need to show that the function y both satisfies the differential equation as well as the boundary condition (a priori, you could have been given a function that satisfies the differential equation but not the boundary condition). Hence, you need to check that both the differential equation and the boundary condition are satisfied.

It is not clear to me what you mean by e^4x-y. Do you mean e^(4x)-y, (e^4)x - y, e^(4x-y), or something else? Please use parentheses or LaTeX to avoid any misunderstanding. Also, please show what you tried and what you got from trying.

3. Dec 28, 2017

Ray Vickson

If your second equation is $dy/dx = e^{4x} - y$ then it is, indeed, "separable", and re-writing it as $dy/dx + y = e^{4x}$ makes it clearer. If your second equation is $dy/dx = e^{4x-y}$ then it is not separable in any standard sense.

The way you wrote it, the first form is what one would get applying standard math parsing rules; however, using parentheses never hurts and can sometimes help.

4. Dec 28, 2017

Orodruin

Staff Emeritus
That is not a separable ODE. A separable ODE can be written on the form $y' f(y) = g(x)$, where $f$ and $g$ are some functions. You can then solve the differential equation by integrating from $x_0$ to $x$ according to
$$\int_{x_0}^x g(\xi) d\xi = \int_{x_0}^x y'(\xi) f(y(\xi)) d\xi = \int_{y(x_0)}^{y(x)} f(y) dy,$$
where the last step is a change of variables in the integral.

That, on the other hand, is separable. I will not do it as it is something the OP should do for himself.

5. Dec 28, 2017

Staff: Mentor

The expression on the right side of the equation is ambiguous. Because many new members here don't realize the importance of using parentheses, it's hard for us to know exactly what you mean when you write e^4x-y.

This could be any of the following:
$e^4~x - y$
$e^{4x} - y$
$e^{4x - y}$
I've written these using LaTeX. Writing the 2nd and 3rd as inline text, they would be e^(4x) - 4 and e^(4x - y).

6. Dec 28, 2017

Ray Vickson

You are right: I am somewhat sloppily using the term "separable" when looking at a nonhomogeneous DE whose homegeneous version is separable, although, of course, it is not separable officially. And, of course, I spoke too soon about the second DE. Blame the lack of morning coffee.

7. Dec 28, 2017

Orodruin

Staff Emeritus
I agree that the homogeneous version $y' + y = 0$ is separable, but perhaps even more relevantly, it has an integrating factor $e^x$ such that $d(e^x y)/dx = e^x(y' + y)$. Multiplying both sides by $e^x$ therefore gives $d(e^x y)/dx = e^{5x}$, which is easily integrated.

8. Jan 3, 2018

Gulfstream757

Sorry for only getting a chance to reply now, I've attached my attempts, I know it looks like I haven't put i

Apologies I only got a chance to reply now, please see the photos attached, as you can see I'm really stuck! Thanks in advance for any help!

9. Jan 3, 2018

Orodruin

Staff Emeritus
The equation as written is separable, so you should start by separating it. Once you have done that it canbe integrated without problems in the manner described in post #4.

10. Jan 3, 2018

Ray Vickson

You are already getting into a bad habit: posting images instead of typed work. Please avoid that in future, especially if you are serious about wanting help. (See the post "guidelines for students and helpers", by Vela, which is pinned to the start of this forum, for various reasons related to this issue.)