# Help in solving an inexact differential equation

#### Hawkingo

1. The problem statement, all variables and given/known data

The question is to solve the inexact equation by turning it into exact.the equation is $( x + y + 4 ) d x + ( - x + y + 6 ) d y = 0$
Where "x" and "y" are variable.

2. Relevant equations

1.(x+y+4)=m and (-x+y+6)=n
2.Integrating Factor =$\frac { 1 } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$
3.a=[(Integrating factor)*m]=$$\frac { ( x + y + 4 ) } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$$ and b=[(Integrating factor)*m]=$$\frac { ( x + y + 4 ) } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$$
4.$t = (x ^ { 2 } + y ^ { 2 } + 4 x + 6 y)$
3. The attempt at a solution
The given equation is a non exact homogeneous equation and is in the form
mdx+ndy = 0
now let's take
( x + y + 4 ) = m and ( - x + y + 6 ) = n
Here $m x+n y$
=$x ^ { 2 } + x y + 4 x - x y + y ^ { 2 } + 6 y$
= $x ^ { 2 } + y ^ { 2 } + 4 x + 6 y \neq 0$
So the integrating factor of the equation should be
I.F = $\frac { 1 } { m x + n y } = \frac { 1 } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$
So now let's convert the inexact equation to exact by multiplying each term with integrating factor.so the new exact equation should be
$\frac { ( x + y + 4 ) } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y } + \frac { ( - x + y + 6 ) } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y } = 0$
=$a x + b y =0$
Where a=$$\frac { ( x + y + 4 ) } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$$ and b= $$\frac { ( x + y + 4 ) } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$$
Now the solution should be $\int a d x + \int b d y = constant$
Where [in term "a" y is constant and the term "b" is free from x]
=$\int \frac { ( x + y + 4 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y } = C$
(As there is no term in "b" free from x)
($C$=constant)
So$$\int \frac { ( x + y + 4 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y } =$$
=$$\int \frac { x + 2 } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y } + \int \frac { ( y + 2 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y }$$
[Now let's put $(x ^ { 2 } + y ^ { 2 } + 4 x + 6 y) = t$
So $( x + 2 ) d x = \frac { d t } { 2 }$]
=$$\frac { 1 } { 2 } \int \frac { d t } { t } + (\int \frac { ( y + 2 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y } )$$
=$$\frac { 1 } { 2 } \log t + ( \int \frac { ( y + 2 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y })$$
=$$\log t ^ { 2 } + ( \int \frac { ( y + 2 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y })$$
=$$\log ( x ^ { 2 } + ( y ^ { 2 } + 4 x + 6 y ) ^ { 2 } + (\int \frac { ( y + 2 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y })$$
So now $\log ( x ^ { 2 } + y ^ { 2 } + 4 x + 6 y ) ^ { 2 } + ( \int \frac { ( y + 2 ) d x } { x ^ { 2 } + y ^ { 2 } + 4 x + 6 y })$= constant

Related Calculus and Beyond Homework News on Phys.org

#### haruspex

Homework Helper
Gold Member
2018 Award
I don't think you have the right way of obtaining the integration factor.
From what I read online, if the factor is 1/P(x,y) then it needs to satisfy
∂(M/P)/∂y=∂(N/P)/∂x

where the inexact equation is M.dx+N.dy=0
Your factor does not seem to have that property.
This is not an area I have ever worked in, so I don't know of a better way; I assumed P was a quadratic in x and y and obtained a solution by sheer algebra.

As a check, if the x2 coefficient is 1 then the constant term in the quadratic is 26.

#### Hawkingo

I don't think you have the right way of obtaining the integration factor.
From what I read online, if the factor is 1/P(x,y) then it needs to satisfy
∂(M/P)/∂y=∂(N/P)/∂x

where the inexact equation is M.dx+N.dy=0
Your factor does not seem to have that property.
This is not an area I have ever worked in, so I don't know of a better way; I assumed P was a quadratic in x and y and obtained a solution by sheer algebra.

As a check, if the x2 coefficient is 1 then the constant term in the quadratic is 26.

Here you can see the formula and I have done according to this.

#### Attachments

• 15.2 KB Views: 292

Homework Helper
Gold Member
2018 Award

#### Delta2

Homework Helper
Gold Member
I certainly can see a mistake in the OP. You say at some point that the term b is free of x, but if I am not mistaken it is

$b=\frac{-x+y+6}{x^2+y^2+4x+6y}$ (another mistake i see is that you seem to say that $b=\frac{x+y+4}{x^2+y^2+4x+6y}$ which is equal to a, I reckon this is a cut and paste mistake ), it clearly is NOT free of x.

#### Hawkingo

I certainly can see a mistake in the OP. You say at some point that the term b is free of x, but if I am not mistaken it is

$b=\frac{-x+y+6}{x^2+y^2+4x+6y}$ (another mistake i see is that you seem to say that $b=\frac{x+y+4}{x^2+y^2+4x+6y}$ which is equal to a, I reckon this is a cut and paste mistake ), it clearly is NOT free of x.
Yes I know that, but even if I corrected that mistake,I can't get my results.and I said that because of the method which is to integrate the part of the "b", which is free of x,and no part of "b" is free of x,so here that value is 0.

#### Hawkingo

I see it is followed by an example. Would you post that too, please?

Here are they.

#### Attachments

• 31 KB Views: 362
• 30.9 KB Views: 298

#### Delta2

Homework Helper
Gold Member
Ok as i understand you need some hint finding the integral $\int \frac{y+2}{x^2+y^2+4x+6y}dx$. y is a constant for this. so essentially you have the integral

$(y+2)\int\frac{1}{x^2+4x+L}dx$ where $L=y^2+6y$. Try to solve this with the help of the integral $\int\frac{1}{t^2+1}dt=\arctan t$

#### haruspex

Homework Helper
Gold Member
2018 Award
Interesting...
What I see online is that the integrating factor being a function of x or y only are easy special cases. Indeed, they are the only examples I have found. I note also that the IF in the example satisfies the equation
∂(M/P)/∂y=∂(N/P)/∂x
where 1/P is the IF. But the IF you obtained using the formula in the text does not satisfy this, so I am suspicious that the formula is not general. Certainly it does not yield the IF I got that satisfies the equation above.

#### Hawkingo

Interesting...
What I see online is that the integrating factor being a function of x or y only are easy special cases. Indeed, they are the only examples I have found. I note also that the IF in the example satisfies the equation

where 1/P is the IF. But the IF you obtained using the formula in the text does not satisfy this, so I am suspicious that the formula is not general. Certainly it does not yield the IF I got that satisfies the equation above.
I have just now realized that my equation is not a homogeneous equation so that's why the formula isn't working.I can't believe I missed such a tiny thing. But can you still tell me now how to find the I.F of this non exact,non homogeneous differential equation?

#### haruspex

Homework Helper
Gold Member
2018 Award
I have just now realized that my equation is not a homogeneous equation so that's why the formula isn't working.I can't believe I missed such a tiny thing. But can you still tell me now how to find the I.F of this non exact,non homogeneous differential equation?
Try my method in post #2. It's a bit of a slog, but it gets there.
Assume the IF is 1/P where P is some quadratic. You can take the x2 coefficient as 1. Find a solution to ∂(M/P)/∂y=∂(N/P)/∂x.
What to do after that I am not sure.

#### Hawkingo

Try my method in post #2. It's a bit of a slog, but it gets there.
Assume the IF is 1/P where P is some quadratic. You can take the x2 coefficient as 1. Find a solution to ∂(M/P)/∂y=∂(N/P)/∂x.
What to do after that I am not sure.
Thanks for trying but I can't still reach the answer.

#### Delta2

Homework Helper
Gold Member

BTW I don't understand why the equation is non homogeneous. Non homogeneous would be if it was $Mdx+Ndy=x^2+y^2$ for example but it is $Mdx+Ndy=0$

#### haruspex

Homework Helper
Gold Member
2018 Award
Thanks for trying but I can't still reach the answer.
Where do you get stuck? It is just a matter of substituting P=x2+axy+by2+ etc. in the PDE I quoted and collecting up terms to find the coefficients a, b, ...
One tip: there is no xy term.

#### haruspex

Homework Helper
Gold Member
2018 Award

BTW I don't understand why the equation is non homogeneous. Non homogeneous would be if it was $Mdx+Ndy=x^2+y^2$ for example but it is $Mdx+Ndy=0$
M and N are not homogeneous functions.

#### LCKurtz

Homework Helper
Gold Member
I think you can eliminate the 4 and 6 with the substitutions $r=x+y+4,~s = -x+y+6$ and make a homogeneous equation in $r$ and $s$ out if it. (Homogeneous in the $f(\lambda x,\lambda y) = \lambda^n f(x,y)$ sense).

#### haruspex

Homework Helper
Gold Member
2018 Award
I'm sure there's a better way, but I embarked on solving the general problem of finding an integration factor for the general first order case: M=Ax+By+C, N=Dy+Ex+F. The IF must be 1/P where P satisfies ∂(M/P)/∂y=∂(N/P)/∂x. I assumed P to be a quadratic in x and y.

I got these coefficients:
x: AEF-BCE-CEE+2ACD-ABF
1: AFF+CCD-BCF-CEF

#### SammyS

Staff Emeritus
Homework Helper
Gold Member
1. The problem statement, all variables and given/known data

The question is to solve the inexact equation by turning it into exact.the equation is $( x + y + 4 ) d x + ( - x + y + 6 ) d y = 0$
Where "x" and "y" are variable.
Consider the following (from Wikipedia: Homogeneous Diff. Eq. (Special Case) )
$( x + y + 5 - 1 ) d x + ( - x + y + 5 + 1 ) d y = 0$

$( x -1 + y + 5 ) d x + ( - x +1 + y + 5 ) d y = 0$

$( (x -1) + (y + 5) ) d x + ( - (x -1) + (y + 5) ) d y = 0$

Make the appropriate change of variables.

Alternatively: Solve for y and get d'Alembert's equation

This is messy, but should work.

#### LCKurtz

Homework Helper
Gold Member
Edit: corrected copy/paste.

If anyone cares, what I got using my idea in post #16 is:
(1/2)*ln(2*x^2-4*x+2*y^2+20*y+52)-arctan((-x+y+6)/(x+y+4)) = C
I haven't checked it though.

Last edited:

#### haruspex

Homework Helper
Gold Member
2018 Award
Edit: corrected copy/paste.

If anyone cares, what I got using my idea in post #16 is:
(1/2)*ln(2*x^2-4*x+2*y^2+20*y+52)-arctan((-x+y+6)/(x+y+4)) = C
I haven't checked it though.
I tried differentiating that and could not get back to the original equation.

Edit:
I get $\frac 12\ln((x-1)^2+(y+5)^2)+\arctan(\frac{x-1}{y+5})$.

The easiest way to make it homogeneous is to adjust each of x and y by a constant: x=X+1, y=Y-5.
(X+Y).dX+(-X+Y).dY=0
Now we can apply the formula in the text to get the IF $\frac 1{X^2+Y^2}$. This leads easily to the solution $\frac 12\ln(X^2+Y^2)+\arctan(\frac{X}{Y})=C$.

Last edited:

#### LCKurtz

Homework Helper
Gold Member
Interesting. I let $u=x+y+4$ and $v=-x+y+6$ and the solution I got in terms of $u$ and $v$ is$$\frac 1 2 \ln(u^2+v^2) - \arctan\frac v u = C$$Pretty similar answers at that stage.

#### haruspex

Homework Helper
Gold Member
2018 Award
Interesting. I let $u=x+y+4$ and $v=-x+y+6$ and the solution I got in terms of $u$ and $v$ is$$\frac 1 2 \ln(u^2+v^2) - \arctan\frac v u = C$$Pretty similar answers at that stage.
But as I posted, I tried differentiating that and it did not lead to the original equation.

#### LCKurtz

Homework Helper
Gold Member
Well, I don't know if I want to spend much more time on this, but if you choose the constant right so $f(0,0) = 0$ in both your and my solution, they both give the same graph on the 4x4 square. I used implicitplot with Maple:

Maybe there is a typo somewhere.

#### Attachments

• 10.4 KB Views: 144

#### SammyS

Staff Emeritus
Homework Helper
Gold Member
Interesting. I let $u=x+y+4$ and $v=-x+y+6$ and the solution I got in terms of $u$ and $v$ is$$\frac 1 2 \ln(u^2+v^2) - \arctan\frac v u = C$$Pretty similar answers at that stage.
I submitted the original problem (no change of variable) to Wolfram Alpha. The result appears to be equivalent to what @LCKurtz has here - after I did quite a bit of algebra and some work with verifying equivalent forms of derivatives of arctangent .

#### haruspex

Homework Helper
Gold Member
2018 Award
I submitted the original problem (no change of variable) to Wolfram Alpha. The result appears to be equivalent to what @LCKurtz has here - after I did quite a bit of algebra and some work with verifying equivalent forms of derivatives of arctangent .
I guess the two forms must be equivalent, but that is far from obvious.

"Help in solving an inexact differential equation"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving