MathGroup Archive 1997

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

Search the Archive

Re:

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9604] Re:
  • From: "Sherman.Reed" <sherman.reed at worldnet.att.net>
  • Date: Thu, 13 Nov 1997 23:24:15 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Saeed,

g[x]=x^(4*(gamma-1)/(gamma+1))/(gamma-1)+x^(-(5-3*gamma)/(gamma+1))

FIRST FUNCTION

k[u]=lambda^(-2(gamma-1)/(gamma+1))*g[x]

SECOND FUNCTION WHICH WILL SUBSTITUE G[X] WHEN EXECUTED IN Mathematica

f[u]=u^(4/(gamma+1))*(1/2+1/((gamma-1)*u^2))

THIRD FUNCTION

new[u_,x_,lambda_]=(k[u]-f[u])/.gamma->7/5

NOW I CREATE A NEW FUNCTION, WHICH IS ONLY A FUNCTION OF U, X, AND
LAMBDA.

PICK A LAMBDA (BELOW) AND HOW MANY DATA POINTS (KK BELOW)
 ( I USED 100, BUT IT DOES RUN SLOW, EVEN ON A PENT 166)

FOR EACH VALUE OF 	i, you get two value of x. 

smalll values of u, larger values of u, and then both are plotted verus
x.

enjoy

Sherman C. Reed
sherman.reed at worldnet.att.net

lambda=1.;
kk=10;
eqna1=Table[{0,0},{k,1,kk}];
eqnb2=Table[{0,0},{k,1,kk}];
For[i=1,i<kk+1,i++,{z=NSolve[new[u,i,1]==0],
	
eqna1[[i,2]]=u/.z[[1]],eqnb2[[i,2]]=u/.z[[2]],eqna1[[i,1]]=eqnb2[[i,1]]=i}]
part1=ListPlot[eqna1,PlotJoined->True,DisplayFunction->Identity];
part2=ListPlot[eqnb2,PlotJoined->True,DisplayFunction->Identity];
Show[part1,part2,PlotRange->{{0,20},All},DisplayFunction->$DisplayFunction,
	PlotLabel->lambda" = lambda",Frame->True,
	GridLines->Automatic,FrameLabel->{x param,param u}];
Show[part1,part2,DisplayFunction->$DisplayFunction,
	PlotLabel->lambda" = lambda",Frame->True,
	GridLines->Automatic,FrameLabel->{x param,param u}];

----------
> From: Saeed Esmaily Rashid <saeedr at stud.ntnu.no>
To: mathgroup at smc.vnet.net
> To: mathgroup at smc.vnet.net
> Subject: [mg9604] 
> Date: Thursday, November 13, 1997 12:40 AM
> 
> Hello!
> 
> My name is Saeed, I have problem that i hope somebody can help me. The
> problem consists of two functions
> 
> f(u):=u^(4/(gamma+1))*(1/2+1/((gamma-1)*u^2))
> 
> and
> 
> g(x):=x^(4*(gamma-1)/(gamma+1))/(gamma-1)+x^(-(5-3*gamma)/(gamma+1))
> 
> they are related to each other by the 
> 
> f(u)=\lambda^(-2(gamma-1)/(gamma+1))*g(x)
> 
> where lambda is some constant, the value of gamma=7/5. I want to plot a
> graph which shows the variation of u as a function of x. I have tried
> for many hours but i can't find the way doing it in Mathematica 3.0.0.
> Any help appriciated.
> 
> Thanks
> 


  • Prev by Date: How do I tell Mathematica than n is an integer?
  • Next by Date: Re: LaTeX Save?
  • Previous by thread: Re: How do I tell Mathematica than n is an integer?
  • Next by thread: Re: plot variation