MathGroup Archive 2005

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

Search the Archive

Re: Plot problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61588] Re: [mg61578] Plot problem
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 23 Oct 2005 05:45:52 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

If you use capital letters for your variables they will get confused with 
Mathematica definitions, e.g., E has a definition

N[E]

2.71828

Clear[r];
r[a_,b_,c_,d_,e_,x_]:=Evaluate[r/.Solve[
              {lamda==Sqrt[r*a*x/b],r==c *x *(d+e/lamda)},
              r,lamda][[1]]//Simplify];

r[a,b,c,d,e,x]

(1/6)*((2*2^(1/3)*a*c^2*d^2*x^2)/(-2*a^3*c^3*d^3*x^3 + 
27*a^2*b*c^2*e^2*x + 
      3*Sqrt[3]*Sqrt[a^4*b*c^4*e^2*x^2*(27*b*e^2 - 4*a*c*d^3*x^2)])^(1/3) 
+ 4*c*d*x + 
   (2^(2/3)*(-2*a^3*c^3*d^3*x^3 + 27*a^2*b*c^2*e^2*x + 
       3*Sqrt[3]*Sqrt[a^4*b*c^4*e^2*x^2*(27*b*e^2 - 4*a*c*d^3*x^2)])^
(1/3))/a)

To plot, you will need to assign values to the constants.

Module[
    {a=4,b=1,c=3,d=7,e=9,ineq,x1,x2},
    ineq=Reduce[{
          Sqrt[a^4*b*c^4*e^2*x^2*(27*b*e^2-4*a*c*d^3*x^2)]>0,
          (-2*a^3*c^3*d^3*x^3+27*a^2*b*c^2*e^2*x+3*Sqrt[3]*
                  Sqrt[a^4*b*c^4*e^2*x^2*(27*b*e^2-4*a*c*d^3*x^2)])>0},
        x,Reals];
    x1=ineq[[1]];
    x2=ineq[[5]];
    Plot[r[a,b,c,d,e,x],{x,x1,x2}]];


Bob Hanlon

> 
> From: "smilehezuk" <smilehezuk at gmail.com>
To: mathgroup at smc.vnet.net
> Date: 2005/10/22 Sat AM 05:11:24 EDT
> Subject: [mg61588] [mg61578] Plot problem
> 
> Hi everyone!
> 
> I want to solve these equations and plot. Please tell me how.
> 
> There are two equations;
> 
> Lamda = Sqrt[R A x/B], R = C x (D + E/Lamda)
> (A,B,C,D,E : constants, x : another variable)
> 
> I need to plot R versus x.
> 
> Please help me. 
> 
> Thank you in advance.
> 
> 


  • Prev by Date: Re: Save everything
  • Next by Date: Re: Save everything
  • Previous by thread: Re: Plot problem
  • Next by thread: Re: Display sound but suppress graphicsDavid Bailey,http://www.dbaileyconsultancy.co.uk