2
2 (ϕ'[r])^2 - 2 u'[r]/r - (u'[r])^2 - u''[r] == 0 

I need to get a relationship between u and ϕ.

waiting for a quick reply. thankyou

kglr
  • 394,356
  • 18
  • 477
  • 896
  • I do not think you can. You have one differential equation and two unknowns. How is the above different from say DSolve[y'[x]+z'[x]+x==0,{y[x],z[x]},x]? What do you expect the answer to be? But may be you can explain how this problem came about? what is the context? What are you trying to do? – Nasser Feb 27 '18 at 07:10
  • @Nasser op does not want solutions for u and phi separately but a relation between them, so I guess in specific cases this could work: Integrate[#, r] & /@ Solve[ 2 (\[Phi]'[r])^2 - 2 u'[r]/r - (u'[r])^2 - u''[r] == 0, (\[Phi]'[r]) ][[1, 1]] but it won't here as Integrate can't handle this. Maybe with a little push from expert it will do, don't know, I'm not one. – Kuba Feb 27 '18 at 07:31

1 Answers1

1

This is indeed possible, the solution is easier than one would expect. I will be using a great code of Kuba posted as the answer to the question about the change of variables in differential expressions

Let us denote f[r]=ϕ'[r]. Now we have the equation

eq[0] = 2 (f[r])^2 - 2 u'[r]/r - (u'[r])^2 - u''[r] == 0

Our goal will be to express u[r] in terms of u[f]. We load the package and do the transformation of variables:

<< MoreCalculus`
eq[1]=DChange[eq[0], {x == f[r]}, {r}, {x}, {u[r]}]

It is convenient to introduce a new variable for the inverse function InverseFunction[f][x], i.e., precisely y[x]=InverseFunction[f,1,1][x]:

eq[2]=eq[1] /. {InverseFunction[f, 1, 1][x] -> y}

Assuming that y[x] is nonsingular

FullSimplify[eq[2] /. {InverseFunction[f, 1, 1][x] -> y}, Assumptions -> y > 0 || y < 0]

we finally obtain

$2 x^2 y=y f''(y) u'(x)+2 f'(y) u'(x)+y f'(y)^2 \left(u''(x)+u'(x)^2\right).$

In this final result, the variable r is completely eliminated resulting in the relationship between u and ϕ variables, albeit implicit! Thus, the problem is formally solved.

However, I anticipate that a more explicit solution might be needed. This is as well possible. Consider a formal series expansion for ϕ[r] such that we can write without loosing generality:

sub[1]=a r^n - (2 u[r])/r - u[r]^2 - Derivative[1][u][r] == 0
sub[2]=a r^n - 2 (ϕ'[r])^2 == 0

Here a and n are arbitrary parameters. The two equations can also be solved analytically leading to the relation between u[r] and ϕ[r]!

DSolve[sub[1], u, r]
DSolve[sub[2], ϕ, r]

They are quite long and will not be reproduced here.

yarchik
  • 18,202
  • 2
  • 28
  • 66