# Numerical solution to PDE using the shooting method and plot.

which I asked earlier today. I realised what I did wrong, I fixed it, but I still get errors.

This is what I want to do.

I want to solve numerically using the shooting method the following PDE (I am using the shooting method because from everything I read I think it fits better to the problem, however, I haven't done much work on numerical solutions of PDE's and if you have alternative suggestions, please let me know.)

$$\partial_r(r^5 \sin^3 \theta_B \partial_r \theta) + \partial_x(r \sin^3 \theta_B \partial_x \theta)- r^3(3 \cos^2\theta_B \sin \theta_B - \frac{3}{2} \sin^2 \theta_B) \theta = 0$$

where of course $\theta=\theta(r,x)$

with

$$\theta_B = \cos^{-1}(\frac{m}{r})$$

and with the conditions

$$\theta(m,x)= 1$$ $$\partial_{r}\theta(m,x) =0$$

and then plot the solution.

This is the code.

\[Theta]B[r_, m_] := ArcCos[m/r]

nsolone = NDSolve[\!$$\*SubscriptBox[\(\[PartialD]$$, $$r$$]$$( \*SuperscriptBox[\(r$$, $$5$$]\
\*SuperscriptBox[$$Sin[\[Theta]B[r, 1]]$$, $$3$$]
\*SubscriptBox[$$\[PartialD]$$, $$r$$]\[Theta][r, x])\)\) + \!$$\*SubscriptBox[\(\[PartialD]$$, $$x$$]$$(r\ \*SuperscriptBox[\(Sin[\[Theta]B[r, 1]]$$, $$3$$]\
\*SubscriptBox[$$\[PartialD]$$, $$x$$]\ \[Theta][r, x])\)\) -
r^3 (3 Cos[\[Theta]B[r, 1]]^2 Sin[\[Theta]B[r, 1]] -
3/2 Sin[\[Theta]B[r, 1]]^2) \[Theta][r, x] == 0, \[Theta][r,
x] , {r, 1, 10^7}, {x, 0, 10^7},
Method -> {"Shooting",
"StartingInitialConditions" -> {\[Theta][1, 0] == 1,  \!$$\*SubscriptBox[\(\[PartialD]$$, $$r$$]$$(\[Theta][1, 0])$$\) == 0}}]


This is the error that I am getting.

NDSolve::femibcnd: No DirichletCondition or Robin-type NeumannValue was specified for {\[Theta]}; the result is not unique up to a constant.


When I try to study the error in order to fix it, this opens with the very generic info on D.E's. http://reference.wolfram.com/language/ref/NDSolve.html

And I do not have any idea how to plot this.

Thanks!!!

• What you call an error is only a hint result is not unique up to a constant. You can plot the solution with Plot3D[\[Theta][r, x] /. nsolone[[1]], {r, 1, 10^7}, {x, 0, 10^7}] but solution unfotunately appears to be zero. Perhaps with additional boundary conditions you can force unique solution? – Ulrich Neumann Feb 6 '18 at 8:55
• Thanks for the hint. I will give it a go. Cheers!!! – DiSp0sablE_H3r0 Feb 6 '18 at 8:59