       Re: NDSolve issues with initial and boundary conditions (corrected characters)

• To: mathgroup at smc.vnet.net
• Subject: [mg119381] Re: NDSolve issues with initial and boundary conditions (corrected characters)
• From: Arturo Amador <arturo.amador at ntnu.no>
• Date: Wed, 1 Jun 2011 04:33:58 -0400 (EDT)

```Ok, I wasn't expecting that. The system is supposed to have a solution for which h[L] == 0 is satisfied. Maybe there is something wrong with the approximation I am using. I would like to know how is that you can implement the shooting method.
I will write a more complete post with the approximation I am using and some other methods I am using to solve the problem for which I am getting of course more issues. Is the bad thing of not being an expert in Mathematica :
/

--

On May 28, 2011, at 1:21 PM, Kevin J. McCann wrote:

> Arturo,
>
> I looked into your problem a bit more. NDSolve should be able to solve
> BVP's, but I tried a shooting method instead with the condition h==0,
> replaced with h[L]==alpha, and I varied alpha a bit to see if I could
> find a solution for which h=0. I couldn't. I found a minimum, but it
> was not close to zero. Is it possible that your problem does not have a
> solution for the conditions you stated? I don't know what the physics of
> the problem is.
>
> Kevin
>
> On 5/25/2011 7:31 PM, Arturo Amador wrote:
>> I am sorry, here is the message without the In[] Out[] labels and with
>> the missing definitions:
>>
>> Hi,
>>
>> Sorry for the previous message, it had some weird characters I have
>> corrected it and resend it.
>>
>> I am having some issues when trying to solve a system of three coupled
>> differential equations numerically using NDSolve. I am trying to specify
>> boundary conditions for two of the variables in the same point (point at
>> L) and a boundary condition for the last variable   at zero. The
>> mathematica code is:
>>
>>
>> vd[x_]:=1/(2^(x+1) \[Pi]^(x/2) Gamma[x/2]) ;
>> factorp[t_]:=(- 2 (Lambda Exp[t])^5 vd)/(3 * 8 g[t]^2);
>> factorg[t_]:=  (2 (Lambda Exp[t])^5 vd)/3;
>> factorh[t_]:=-((2 (Lambda Exp[t])^5 vd)/3 );
>>
>> vacuumlinearrhsp = (-((4 E^(-4 t) Sqrt[E^(2 t) Lambda^2] (-1 + n) g[t]^2)/ Lambda^4) - (12 g[t]^2)/(E^(2 t) Lambda^2 + 16 g[t]^2 p0[t])^(3/2)) factorp[t]
>>
>> vacuumcuadraticrhsg = ((24 E^(-6 t) Sqrt[E^(2 t) Lambda^2] (-1 + n) g[t]^4)/Lambda^6 + (216 g[t]^4)/(E^(2 t) Lambda^2 + 16 g[t]^2 p0[t])^(5/2)) factorg[t]
>>
>> vacuumcubicrhsh =(-((160 E^(-8 t) Sqrt[E^(2 t) Lambda^2] (-1 + n) g[t]^6)/Lambda^8) - (4320 g[t]^6)/(E^(2 t) Lambda^2 + 16 g[t]^2 p0[t])^(7/2)) factorh[t]
>>
>> (*Declarations*)
>> Lambda = Sqrt msig;
>>
>> L = -17090/10000;
>> msig = 400;
>>
>> mp = 0;
>> fp = 93;
>>
>> lambda = 2 (msig^2 - mp^2)/fp^2;
>> gk0 = (lambda/24)^(1/2);
>> pk0 = 1/2 fp^2;
>>
>> n = 4;
>>
>>
>> sol = NDSolve[{D[p0[t], t] == vacuumlinearrhsp, 4 D[g[t]^2, t] + 3 h[t] D[p0[t], t] == vacuumcuadraticrhsg, D[h[t], t] == vacuumcubicrhsh, p0[L] == pk0, g[L]^2 == gk0^2,  h == 0}, {p0, g, h}, {t, L, 0}, Method ->  {StiffnessSwitching,   Method ->  {ExplicitRungeKutta, Automatic}}];
>>
>> with output:
>>
>> Power::infy: Infinite expression 1/0. encountered.>>
>>
>> Infinity::indet: Indeterminate expression (0. Sqrt ComplexInfinity)/\[Pi]^2 encountered.>>
>>
>> Power::infy: Infinite expression 1/0.^2 encountered.>>
>>
>> Infinity::indet: Indeterminate expression (0. Sqrt ComplexInfinity)/\[Pi]^2 encountered.>>
>>
>> Power::infy: Infinite expression 1/0. encountered.>>
>>
>> General::stop: Further output of Power::infy will be suppressed during this calculation.>>
>> Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered.>>
>> General::stop: Further output of Infinity::indet will be suppressed during this calculation.>>
>> NDSolve::ndnum: Encountered non-numerical value for a derivative at t = -1.709.>>
>>
>> I am sure there is no singularity. I am getting this output no matter
>> what value I am giving for h, as long as I specify the boundary
>> condition in a point that is not L, it gives me this same error message.
>> I have tried h[0.9L] and still the same. When h[t]=0 The system
>> reduces to this:
>>
>> sol = NDSolve[{D[p0[t], t] == (Lambda Exp[t])^5/(24 Pi^2) ( (n - 1)/(Lambda Exp[t])^3 +3/((Lambda Exp[t])^2 + 16 p0[t] g[t]^2)^(3/2)), D[g[t]^2,t] == ((Lambda Exp[t])^5 * g[t]^4 )/(2 Pi^2) ((n - 1)/(Lambda Exp[t])^5 + 9/((Lambda Exp[t])^2 + 16 p0[t] g[t]^2)^(5/2)), p0[L] == pk0,  g[L]^2 == gk0^2}, {p0, g}, {t, L, 0}, Method ->  {StiffnessSwitching,   Method - {ExplicitRungeKutta, Automatic}}];
>>
>> For which I get nice solutions.
>>
>>
>>
>> Thanks in advance
>>
>>
>>
>>
>>> You have functions factorp[t], factorg[t], and factorh[t] in your code without definitions.
>>>
>>> It would be a lot easier for us to cut and paste your stuff if you left off the In[] Out[] labels.
>>>
>>> Kevin
>>> On 5/25/2011 6:59 AM, Arturo Amador wrote:
>>>> Hi,
>>>>
>>>> Sorry for the previous message, it had some weird characters I have
>>>> corrected it and resend it.
>>>>
>>>> I am having some issues when trying to solve a system of three coupled
>>>> differential equations numerically using NDSolve. I am trying to specify
>>>> boundary conditions for two of the variables in the same point (point at
>>>> L) and a boundary condition for the last variable at zero. The
>>>> mathematica code is:
>>>>
>>
>>
>

```

• Prev by Date: Re: Evaluation control in Compile[]
• Next by Date: Re: Export["...",...,"GIF"] results in nonreadable gif file
• Previous by thread: Re: Even and Odd functions
• Next by thread: Re: NDSolve issues with initial and boundary conditions (corrected characters)