0
$\begingroup$

I am trying to solve this equation in MMA 11.3

$2 \epsilon s^{\prime \prime}+\frac{1-s}{2 \epsilon}=0$;

BCs: $s^{\prime}( \pm 1)=0$ and $s\left(0\right)=0$;

The analytical solution is expressed as:$s^{ \pm}(x)=1-\cosh \left(\frac{x}{2 \epsilon}\right) \pm \operatorname{coth}\left(\frac{1}{2 \epsilon}\right) \sinh \left(\frac{x}{2 \epsilon}\right)$.

However, the solution from MMA 11.3 test code is not corret:

Code

pf = DSolve[{s''[x]*2*\[Epsilon] + 0.5 (1 - s[x])/\[Epsilon] == 0, 
   s[0] == 0, s'[-1] == 0, s'[1] == 0}, s, x] 

if we validate the solution:

\[Epsilon] = 0.009
Plot[Evaluate[s[x] /. pf], {x, -1, 1}]

Output:enter image description here

now how can we derive the correct solution in MMA?

$\endgroup$
10
  • $\begingroup$ 1. With "11.3.0 for Microsoft Windows (64-bit) (March 27, 2018)", I got {} as the output with DSolve::bvnul warning, have you Clear[s]? 2. You should solve with s[0] == 0, s'[-1] == 0 and s[0] == 0, s'[1] == 0 separately. $\endgroup$
    – xzczd
    Aug 22, 2019 at 12:37
  • $\begingroup$ @xzczd I think this equation is not complex and the bcs are very clear, we should solve this equation without any difficults in MMA? $\endgroup$
    – ABCDEMMM
    Aug 22, 2019 at 12:39
  • $\begingroup$ It's complicated enough in certain sense, because the solution actually isn't a classical one, it doesn't satisfy the ODE at $x=0$. Some debates can be found under this answer: mathematica.stackexchange.com/a/188918/1871 $\endgroup$
    – xzczd
    Aug 22, 2019 at 12:45
  • $\begingroup$ Two(not three ) boundary conditions should be enough I think! $\endgroup$ Aug 22, 2019 at 12:57
  • $\begingroup$ two Bcs works only for x-> 0 ->>>>... $\endgroup$
    – ABCDEMMM
    Aug 22, 2019 at 13:10

1 Answer 1

1
$\begingroup$

Not an answer, only verification of the analytical solution:

positive sign:

{Limit[s[x], x -> 0], s'[-1], s'[1], s[x] == s[-x], s''[x]*2*\[Epsilon] + 1/2 (1 -s[x])/\[Epsilon] == 0 } /.
s -> Function[x,1 - Cosh[x/(2 \[Epsilon])] + Coth[x/(2 \[Epsilon])] Sinh[x/(2 \[Epsilon])]] // FullSimplify      
(*{1, 0, 0, True, True}*)

Solution fullfills the ode, is symmetrix s[x]==s[-x] and s[0]==1,s'[-1]==s[1]==0!

negative sign:

{Limit[s[x], x -> 0], s'[-1], s'[1], s[x] == s[-x], s''[x]*2*\[Epsilon] + 1/2 (1 -s[x])/\[Epsilon] == 0 } /.
s -> Function[x,1 - Cosh[x/(2 \[Epsilon])] -Coth[x/(2 \[Epsilon])] Sinh[x/(2 \[Epsilon])]] // FullSimplify      
(*{-1, Sinh[1/(2 \[Epsilon])]/\[Epsilon], -(Sinh[1/(2 \[Epsilon])]/\[Epsilon]), True, True}*)

Solution fullfills the ode, is symmetrix s[x]==s[-x] and s[0]==-1,s'[-1]==-s[1]!=0!

Obviously the analytical solutions and the boundary conditions don't match!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.