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: [mg107261] Re: [mg107228] NDSolve with Dirichlet boundary condition
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sun, 7 Feb 2010 06:12:33 -0500 (EST)
  • References: <201002060823.DAA14151@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

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
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Mathematica 6.01 does not know one can not divide by
  • Next by Date: Semantics of Sum for index set in reverse order. WasRe: is it a
  • Previous by thread: NDSolve with Dirichlet boundary condition
  • Next by thread: Re: NDSolve with Dirichlet boundary condition