3

I am trying to get numeric solution for equations: $$ \left\{x^{(2,0)}(u,t) \left(1-\frac{y^{(1,0)}(u,t)^2}{\left(x^{(1,0)}(u,t)^2+y^{(1,0)}(u,t)^2\right)^{3/2}}\right)+\frac{x^{(1,0)}(u,t) y^{(1,0)}(u,t) y^{(2,0)}(u,t)}{\left(x^{(1,0)}(u,t)^2+y^{(1,0)}(u,t)^2\right)^{3/2}}-x^{(0,2)}(u,t)=0,-\frac{x^{(1,0)}(u,t)^2 y^{(2,0)}(u,t)}{\left(x^{(1,0)}(u,t)^2+y^{(1,0)}(u,t)^2\right)^{3/2}}+\frac{x^{(2,0)}(u,t) x^{(1,0)}(u,t) y^{(1,0)}(u,t)}{\left(x^{(1,0)}(u,t)^2+y^{(1,0)}(u,t)^2\right)^{3/2}}-y^{(0,2)}(u,t)+y^{(2,0)}(u,t)=0\right\} $$ with boundary conditions: $x(0,t)=0,x(1,t)=1,y(0,t)=0,y(1,t)=0,x(u,0)=u,y(u,0)=0,x^{(0,1)}(u,10)=0,y^{(0,1)}(u,10)=0$ Wolfram mathematica says:

CoefficientArrays::poly: $-\text{x$\$$4346}+\text{x$\$$4349} \left(1-\frac{\text{y$\$$4347}^2}{\left(\text{x$\$$4348}^2+\text{y$\$$4347}^2\right)^{3/2}}\right)+\frac{\text{x$\$$4348} \text{y$\$$4347} \text{y$\$$4350}}{\left(\text{x$\$$4348}^2+\text{y$\$$4347}^2\right)^{3/2}}$ is not a polynomial.

NDSolve::femper: PDE parsing error of $\left\{-\text{x$\$$4346}+\text{x$\$$4349} \left(1-\frac{\text{y$\$$4347}^2}{\left(\text{x$\$$4348}^2+\text{y$\$$4347}^2\right)^{3/2}}\right)+\frac{\text{x$\$$4348} \text{y$\$$4347} \text{y$\$$4350}}{\left(\text{x$\$$4348}^2+\text{y$\$$4347}^2\right)^{3/2}},\frac{\text{x$\$$4348} \text{x$\$$4349} \text{y$\$$4347}}{\left(\text{x$\$$4348}^2+\langle\langle 6\rangle\rangle ^2\right)^{\frac{3}{2}}}+\text{y$\$$4350}-\frac{\text{x$\$$4348}^2 \text{y$\$$4350}}{(\langle\langle 1\rangle\rangle +\langle\langle 1\rangle\rangle )^{\frac{3}{2}}}-\text{y$\$$4351}\right\}$ . Inconsistent equation dimensions.

What am I doing wrong?

Add, code in mathematica:

<< VariationalMethods`

L = 1/2 ((D[x[u, t], t]^2 + D[y[u, t], t]^2) - 
    (Sqrt[D[x[u, t], u]^2 + D[y[u, t], u]^2] - 1)^2)

eq = EulerEquations[L, {x[u, t], y[u, t]}, {u, t}]

cond = {x[0, t] == 0, x[1, t] == 1, y[0, t] == 0, y[1, t] == 0}

addcond = {x[u, 0] == u, y[u, 0] == 0, (D[L, D[x[u, t], t]] /. {t -> 10}) == 0, 
    (D[L, D[y[u, t], t]] /. {t -> 10}) == 0}

NDSolve[{eq, cond, addcond}, {x[u, t], y[u, t]}, {u, 0, 1}, {t, 0, 10}]
Michael E2
  • 235,386
  • 17
  • 334
  • 747
qwe8013
  • 31
  • 2
  • 3
    Please copy the actual code you used into your question in Mathematica format so that readers can copy and run it. – bbgodfrey Aug 30 '16 at 22:22
  • Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory [tour] now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Aug 30 '16 at 22:24
  • I added actual code. – qwe8013 Sep 02 '16 at 15:24
  • Euler's equations usually are solved as an initial value problem. Here, it is posed as a boundary value problem, with positions specified at t == 0 and velocities at t == 10. Is this intentional? With both defined at t == 0, the code runs fine. – bbgodfrey Sep 02 '16 at 16:38
  • You are right. I had to solve it as an initial value problem. But why mathematica can not solve a boundary value problem? – qwe8013 Sep 02 '16 at 17:50
  • Here is my understanding, which could be wrong. Boundary value PDEs are best solved by finite element method, but I do not believe that Mathematica's implementation of FEM can handle nonlinear PDEs. But, the alternative, the Method of Lines, is meant for initial value problems. Nonetheless, NDSolve should fail gracefully, not with these strange error messages. So it may be a bug. Nonetheless, Mathematica probably can solve your problem by the method described in the Introduction here. – bbgodfrey Sep 02 '16 at 18:00
  • Comment continued. You would need to decompose your PDEs into a family of coupled ODEs in t and then apply the time-related boundary conditions using the "Shooting" Method. I have done this sort of thing, but it takes some work. – bbgodfrey Sep 02 '16 at 18:04
  • I should add that, because the PDEs are nonlinear, there may be no solution for the given boundary conditions. Do you have information to the contrary? – bbgodfrey Sep 02 '16 at 18:22
  • ** Do you have information to the contrary?** - No. – qwe8013 Sep 02 '16 at 18:56
  • Possible duplicate: http://mathematica.stackexchange.com/questions/87723/fem-giving-is-not-a-polynomial-error – Michael E2 Sep 02 '16 at 23:32

0 Answers0