MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NDSolve with Dirichlet boundary condition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107303] Re: [mg107228] NDSolve with Dirichlet boundary condition
  • From: Frank Breitling <fbreitling at aip.de>
  • Date: Mon, 8 Feb 2010 07:54:29 -0500 (EST)
  • References: <201002060823.DAA14151@smc.vnet.net> <op.u7p6laqetgfoz2@bobbys-imac.local>

Dear Bobby,

Thank you very much for your answer.
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: Exception message from java: MathLink connection was lost.
  • Next by Date: Re: LaplaceTransform[SquareWave[]] ??
  • Previous by thread: Re: NDSolve with Dirichlet boundary condition
  • Next by thread: Re: NDSolve with Dirichlet boundary condition