MathGroup Archive 2012

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

Search the Archive

NIntegrate and Plot solution of differ. equa. over initial conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124392] NIntegrate and Plot solution of differ. equa. over initial conditions
  • From: Itzhak Shechtman <shechtma at netvision.net.il>
  • Date: Wed, 18 Jan 2012 05:59:51 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi all,

I would be grateful for any help.

I have the set of 2 ordinary differential equations:


Clear[sol, q, k];
B = 5.5*10^7;
q[x_, y_] = 1 + 2 x + x^2 + y^2;
k[x_, y_] = 2 (x/(1 + 2 x + x^2 + y^2))^0.5;
sol[p_?NumericQ,v_
?NumericQ]:=NDSolve[{ 
   x''[t]==
      B*(2 (1 - k[x[t], y[t]]^2)*
      EllipticK[k[x[t], y[t]]] - (2 - k[x[t], y[t]]^2*   
      (1+x[t]))* EllipticE[k[x[t], y[t]]])/(q[x[t], 
      y[t]]^1.5 k[x[t], y[t]]^2*(1 - k[x[t], y[t]]^2)),
   y''[t] ==
     B*2 y[t]*
      EllipticE[k[x[t], y[t]]]/(q[x[t], y[t]]^1.5*(1 - k[x[t], y[t]]^2)), 
   x[0] == p, x'[0] == 0, 
   y'[0]== v, y[0]==-100000},
{x, y}, {t, 0,2}];

I wish to:

1) sol1=NIntegrate[p*v*(v-y'[2])/.sol,{p,0.1,1}]; and

2) Plot[sol1,{v,10^3,10^5}]
    
Mathematica does not accept it, objecting to solving the equations with non numeric initial conditions( p and v ), despite the above definition of sol.

Does anyone have an idea?
Thanks for the trouble.

Itzhak



  • Prev by Date: Re: MatrixPower problem
  • Next by Date: Problem Integrating a sequence of polynomials
  • Previous by thread: How to set up Intel C++ Composer XE for Mathematica on windows 7?
  • Next by thread: Re: NIntegrate and Plot solution of differ. equa. over initial conditions