ATH: Solving Differential Equations for B(x) with Constraints and a Constant K

  • Thread starter Thread starter Mentz114
  • Start date Start date
  • Tags Tags
    Instruction
Mentz114
Messages
5,429
Reaction score
292
This is not homework, these equations are constraints I've encountered in some GR work.

But I'm hopeless with differential equations and I have two I need to solve. Even after reading some instructive texts, I still can't do it.


\frac{dB(x)}{dx} = \frac{B(x)}{x} - \frac{1}{x}

\frac{dB(x)}{dx} = \frac{B(x)}{x} - \frac{1}{x} + \frac{K}{B(x)}

K is a constant. I know the first one has a solution but the second one might not.

M
 
Physics news on Phys.org
Mentz114 said:
This is not homework, these equations are constraints I've encountered in some GR work.

But I'm hopeless with differential equations and I have two I need to solve. Even after reading some instructive texts, I still can't do it.


\frac{dB(x)}{dx} = \frac{B(x)}{x} - \frac{1}{x}

\frac{dB(x)}{dx} = \frac{B(x)}{x} - \frac{1}{x} + \frac{K}{B(x)}

K is a constant. I know the first one has a solution but the second one might not.

M

For the 1st one

B'(x) = \frac{B(x)}{x} - \frac{1}{x}\Rightarrow \frac{B'(x)}{x}-\frac{B(x)}{x^2}=-\frac{1}{x^2}\Rightarrow (\frac{B(x)}{x})'=(\frac{1}{x})'\Rightarrow \frac{B(x)}{x}=\frac{1}{x}+c\Rightarrow B(x)=c\,x+1

For the 2nd one, let B(x)=K\,x\,f(x), then

f'(x)=\frac{-f(x)+1}{K\,x^2\,f(x)}\Rightarrow\frac{f(x)\,d\,f(x)}{-f(x)+1}=\frac{d\,x}{K\,x^2}\Rightarrow f(x)+\log(f(x)-1)=\frac{1}{K\,x}+c\Rightarrow \frac{B(x)}{K\,x}+\log(\frac{B(x)}{K\,x}-1)=\frac{1}{K\,x}+c

which is the general implicit solution and can be written with in terms of the product log function.
 
Hi Rainbow,

thanks for the help, much appreciated. It looks like witchcraft to me. Unfortunately I transposed the signs and your solution depends crucially on the sign. So I'm back to square one.

Which serves me right for being a pratt.
M
 
Last edited:
Rainbow Child said:
For the 2nd one, let B(x)=K\,x\,f(x), then

f'(x)=\frac{-f(x)+1}{K\,x^2\,f(x)}\Rightarrow\frac{f(x)\,d\,f(x)}{-f(x)+1}=\frac{d\,x}{K\,x^2}\Rightarrow f(x)+\log(f(x)-1)=\frac{1}{K\,x}+c\Rightarrow \frac{B(x)}{K\,x}+\log(\frac{B(x)}{K\,x}-1)=\frac{1}{K\,x}+c

which is the general implicit solution and can be written with in terms of the product log function.

I get a slightly different solution:

\frac{B(x)}{Kx}+\ln\left|1-\frac{B(x)}{Kx}\right|=\frac{1}{Kx}+c

There seems to be something with the absolute value.
Mmm, I use ln, sorry for that, it makes it easier for me to see what is meant.

@Rainbow Child: What do you exactly mean by "product log function"
 
coomast said:
I get a slightly different solution:

\frac{B(x)}{Kx}+\ln\left|1-\frac{B(x)}{Kx}\right|=\frac{1}{Kx}+c

There seems to be something with the absolute value.
Mmm, I use ln, sorry for that, it makes it easier for me to see what is meant.

@Rainbow Child: What do you exactly mean by "product log function"

I was working on the complex plane, that's why I didn't put the absolute value.

The product log function is the multivalued function w(z) defined by

z=w(z)\,e^{w(z)}

Thus for the solution at hand

\frac{B(x)}{K\,x}+\log(\frac{B(x)}{K\,x}-1)=\frac{1}{K\,x}+c

we have

(\frac{B(x)}{K\,x}-1)\,\exp(\frac{B(x)}{K\,x})=\exp(\frac{1}{K\,x}+c)\Rightarrow (\frac{B(x)}{K\,x}-1)\,\exp(\frac{B(x)}{K\,x}-1)=\exp(\frac{1}{K\,x}+c-1)\Rightarrow \frac{B(x)}{K\,x}-1=w\left(\exp(\frac{1}{K\,x}+c-1)\right)

yielding to

B(x)=K\,x\,\left(1+w(C\,e^{\frac{1}{K\,x}})\right), \quad C=\exp(c-1)
 
I was under the assumption that the differential equation of the original post was to have a real valued function as solution. Therefore the use of ln instead of log. In case I assume that it is to be real, then I think that the solution I gave was correct. That leaves us with a minus sign difficulty or am I making a mistake?

I never used the product log function (or Lambert W function, google). Always good to learn something new. I looked in the books of Erdelyi, Magnus, Oberhettinger, Tricomi and the one of Abramowitz, Stegun, but couldn't find it. It seems to be a rarely used one. Very nice.
 
I wrote \log because I am used with this notation for the natural logarithm. :smile: For the real domain your solution is the correct one.

The product log function w(z) often appears when you are dealing with GR, i.e. in maximally symmetric two-dimensional surfaces. But in GR we are always allowed to make a coordinate transformation, and get rid of the product log function. :cool:
 
Thanks to both of you. I may have learned enough to solve the correct equations.
 
Back
Top