Re: NDSolve with Dirichlet boundary condition

• To: mathgroup at smc.vnet.net
• Subject: [mg107317] Re: [mg107228] NDSolve with Dirichlet boundary condition
• From: Frank Breitling <fbreitling at aip.de>
• Date: Tue, 9 Feb 2010 02:44:13 -0500 (EST)
• References: <201002060823.DAA14151@smc.vnet.net> <op.u7p6laqetgfoz2@bobbys-imac.local> <4B6FDD7E.6080000@aip.de> <op.u7tku6nntgfoz2@bobbys-imac.local>

```Hi Bobby,

My real equation is

D[r^2 k0 T[r]^(5/2) T'[r], r] == 3/2 kB T'[r]-(kB T[r])/n[r] n'[r]

where kB and k0 are constants and n[r] is a monotonically decreasing
(non analytic) function with n[r]->0 for r->infinity.

I think I can't apply your transformation here.
But anyways thanks a lot for your thoughts!

Frank

On 2010-02-08 18:43, DrMajorBob wrote:
>> Therefore my question is whether it is possible to solve my simplified
>> example using NDSolve or any other non analytic method of Mathematica.
>
> I solved this with DSolve in my post, but NDSolve also works:
>
> NDSolve[{y''[r] == 0, y[0] == 50, y[1] == 1/2}, y, {r, 0, 1}]
>
> {{y->InterpolatingFunction[{{0.,1.}},<>]}}
>
> If your simplified example is like the real problem, there should be a
> way to transform, as I did, and solve.
>
> Bobby
>
> On Mon, 08 Feb 2010 03:46:38 -0600, Frank Breitling <fbreitling at aip.de>
> wrote:
>
>> Dear Bobby,
>>
>> Unfortunately my original problem doesn't allow for an analytic
>> solution, since the equation is more complex and involves interpolating
>> functions.
>> Therefore my question is whether it is possible to solve my simplified
>> example using NDSolve or any other non analytic method of Mathematica.
>>
>> Frank
>>
>>
>> On 2010-02-06 22:42, DrMajorBob wrote:
>>> Define y as follows and compute its derivative:
>>>
>>> Clear[x,y,r]
>>> y[r_]=x[r]^2/2;
>>> y'[r]
>>>
>>> x[r] (x^\[Prime])[r]
>>>
>>> Hence your equations are equivalent to
>>>
>>> {y''[r]==0, y[0] == 50, y[1] == 1/2}
>>>
>>> The first equation says that y is linear. Specifically,
>>>
>>> y[r_] = InterpolatingPolynomial[{{0, 50}, {1, 1/2}}, r]
>>>
>>> 50 - (99 r)/2
>>>
>>> and hence,
>>>
>>> x[r_] = Sqrt[2 y[r]]
>>>
>>> Sqrt[2] Sqrt[50 - (99 r)/2]
>>>
>>> Solving the same thing in Mathematica, we get:
>>>
>>> Clear[y]
>>> DSolve[{y''[r]==0,y[0]==50,y[1]==1/2},y,r]
>>> {{y->Function[{r},1/2 (100-99 r)]}}
>>>
>>> Or, for the original problem:
>>>
>>> Clear[x, r]
>>> DSolve[{D[x[r] x'[r], r] == 0, x[0] == 10, x[1] == 1}, x, r]
>>>
>>> {{x -> Function[{r}, -I Sqrt[-100 + 99 r]]}}
>>>
>>> That's the same as the earlier (real-valued) solution, even though it
>>> appears to be Complex.
>>>
>>> Simplify[-I Sqrt[-100 + 99 r] - Sqrt[2] Sqrt[50 - (99 r)/2],
>>>  r < 100/99]
>>>
>>> 0
>>>
>>> Bobby
>>>
>>> On Sat, 06 Feb 2010 02:23:21 -0600, Frank Breitling <fbreitling at aip.de>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I was not able to solve the following differential equation with
>>>> Mathematica 7.01.0 using:
>>>>
>>>> NDSolve[{D[x[r]x'[r],r]==0, x[0]==10, x[1]==1}, x, {r,0,1}]
>>>>
>>>> Since my original problem is inhomogeneous and involves interpolating
>>>> functions DSolve is not an option.
>>>>
>>>> Is there a way to solve this problem using Mathematica?
>>>> Any help is highly appreciated.
>>>>
>>>> Best regards
>>>>
>>>> Frank
>>>>
>>>
>>>
>>
>
>

```

• Prev by Date: Re: Re: Integral confusion
• Next by Date: Re: NDSolve with Dirichlet boundary condition
• Previous by thread: Re: NDSolve with Dirichlet boundary condition
• Next by thread: Re: NDSolve with Dirichlet boundary condition