# homework help - differential equations

• August 21st 2006, 02:12 PM
action259
homework help - differential equations
wondering if someone could give me a hand on these couple of questions

1. (x^2+1)dy/dx+y^2+1=0 y(0)=1

2. (x^2-x-2)dy/dx-y=0

3. dy/dx-y=3e^x

Any help would be appreciated
• August 21st 2006, 02:18 PM
Jameson
Quote:

Originally Posted by action259

1. (x^2+1)dy/dx+y^2+1=0 y(0)=1

#1)Separate variables.

$(x^2+1)dy=(-y^2-1)dx$

Rewrite: $-\frac{1}{y^2+1}dy=\frac{1}{x^2+1}dx$

Those are both arctan integrals so you can take it from there!
• August 21st 2006, 02:24 PM
Jameson
Quote:

Originally Posted by action259

2. (x^2-x-2)dy/dx-y=0

#2) Separate variables.

$(x^2-x-2)dy=ydx$

Rewrite: $\frac{1}{y}dy=\frac{1}{x^2-x-2}dx$

The left integral is trivial but for the second one use partial fractions.

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

Now: $\frac{A}{x-2}+\frac{B}{x+2}=\frac{1}{x^2-x-2}$

$A(x-1)+B(x-2)=1$

Let x=1, $-B=1$ so B=-1

Let x=2 $A=1$

So $\frac{1}{y}dy=\frac{1}{x-2}-\frac{1}{x+1}dx$
• August 21st 2006, 03:39 PM
topsquark
[QUOTE=action259]dy/dx-y=3e^x[\QUOTE]

First solve the homogeneous equation:
$\frac{dy_h}{dx} - y_h = 0$

Solve the (characteristic?) equation $m - 1 = 0$.

So m = 1. Thus $y_h = Ae^{x}$.

Now we need a particular solution. Since the RHS of the original equation is $e^x$, try:

$y_p = Bxe^x$ ( $e^x$ is a solution to the homogeneous equation so it won't work here.)

$\frac{dy_p}{dx} = Be^x + Bxe^x$

so inserting these into the original equation we get:
$Be^x + Bxe^x - Bxe^x = 3e^x$

Thus B = 3.

So the final solution is $y = y_h + y_p = Ae^x + 3xe^x$.

-Dan
• August 21st 2006, 03:53 PM
ThePerfectHacker
Quote:

Originally Posted by action259
3. dy/dx-y=3e^x

Method #2
---
Regocnize this to be a linear-first order differential equation.
Here,
$P(x)=-1$ and $Q(x)=3e^x$
Thus,
$I(x)=e^{\int -1 dx}=e^{-x}=e^{-x}$
And,
$\int I(x)Q(x)dx=\int 3e^{-x}e^{x}dx=3x+C$
Thus, the solution(s) is,
$\frac{1}{e^{-x}}(3x+C)$
Thus,
$y=3xe^x+Ce^x$
• August 21st 2006, 04:22 PM
ThePerfectHacker
Method #3
---
Express as,
$dy-ydx=3e^xdx$
Thus,
$(-y-3e^x)dx+(1)dy=0$ (1)
Find the integrating factor,
$e^{-x}$
Multiply both sides by it,
$(-ye^{-x}-3)dx+(e^{-x})dy=0$
Now check if it is conservative,
$\frac{\partial (-ye^{-x}-3)}{\partial y}=\frac{\partial (e^{-x})}{\partial x}\rightarrow -e^{-x}=-e^{-x}$---Good.
We have turned this differencial equation into an exact differenciatial equation.
Therefore, there exists a function,
$f(x,y)=K$ such as,
$d(f(x,y))=0$ gives our equation above.
---
Let $f(x,y)$ be such a function. Then,
$d(f(x,y))=f_x(x,y)dx+f_y(x,y)dy$
Thus,
$f_x(x,y)=-ye^{-x}-3$
$f_y(x,y)=e^{-x}$
Solving the second partial differential equation yields,
$f(x,y)=ye^{-x}+\phi(x)$ (a function of x alone).
Thus,
$f_x(x,y)=-ye^{-x}+\phi'(x)$
Thus,
$\phi'(x)=-3$
Thus,
$\phi(x)=-3x+C$
Therefore, the function is,
$f(x,y)=-ye^{-x}-3x+C$
Thus,
$-ye^{-x}-3x+C=K$
Thus,
$y=3xe^x+Ce^x$
• August 21st 2006, 05:11 PM
action259
thanks for the help it was really useful...i got another question. I'm doing a question that asks me to find the value of the family of curves if the slope of the tangent at any point is (1-2x)/(1+y)

now does this mean that dy/dx=(1-2x)/(1+y), which is a separable equation, i'm not really sure what i am supose to find. if i solve the equation i get
x-x^2=y+y^2, how does this help me?
• August 21st 2006, 07:26 PM
ThePerfectHacker
Quote:

Originally Posted by action259
thanks for the help it was really useful...i got another question. I'm doing a question that asks me to find the value of the family of curves if the slope of the tangent at any point is (1-2x)/(1+y)

now does this mean that dy/dx=(1-2x)/(1+y), which is a separable equation, i'm not really sure what i am supose to find. if i solve the equation i get
x-x^2=y+y^2, how does this help me?

Affirmative.

$\frac{dy}{dx}=\frac{1-2x}{1+y}$
Which is seperable.
• August 21st 2006, 07:45 PM
Soroban
Hello, action259!

Check the original wording of the problem, please.
There is no "value of the family of curves".

Quote:

Find the family of curves if the slope of the tangent at any point is: $\frac{1-2x}{1+y}$

Does this mean that $\frac{dy}{dx} \:=\:\frac{1-2x}{1+y}$, which is a separable equation? . . . yes!

If i solve the equation i get: $x - x^2\:=\:y+y^2$ . . . um, not quite
How does this help me?

Separate the variables: . $(1 + y)\,dy \:=\:(1 - 2x)\,dx$

Integrate: . $y + \frac{1}{2}y^2\;=\;x - x^2 + C$

We have:
. . . . $x^2 - x \qquad + y^2 + \frac{1}{2}y \qquad \;=\;C$

Complete the square:
. . . . $x^2 - x + \frac{1}{4} + y^2 + \frac{1}{2}y + \frac{1}{16}\;=\:C + \frac{1}{4} + \frac{1}{16}$

And we have:
. . . . . . . $\left(x - \frac{1}{2}\right)^2 + \left(y + \frac{1}{4}\right)^2\;=\;C + \frac{5}{16}$

The family is the set of all circles with center at $\left(\frac{1}{2},-\frac{1}{4}\right)$
. . and radius $\sqrt{C + \frac{5}{16}}$ . . . where $C \geq -\frac{5}{16}$