Robert Israel

6577 Reputation

21 Badges

18 years, 217 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

Sorry, I gave you t as a function of y rather than the reverse.

> yf:= t -> fsolve(eval(y = (a*exp(-b*t) + c)*(d*y^e + e*y^f),{op(abcsol),op(defgsol)}),y=0..1000);
> yf(1);

127.4000077

> plot(yf, 0 .. 10, labels = [t,y]);


  

Sorry, I gave you t as a function of y rather than the reverse.

> yf:= t -> fsolve(eval(y = (a*exp(-b*t) + c)*(d*y^e + e*y^f),{op(abcsol),op(defgsol)}),y=0..1000);
> yf(1);

127.4000077

> plot(yf, 0 .. 10, labels = [t,y]);


  

If the data are not exact but only approximate, it's probably better to use some sort of least-squares approximation rather than interpolation.
For A(t), it looks to me like a constant plus an exponential might be a good fit.  For B(Y), maybe a linear combination of two powers.
 

> with(Optimization):
  Tdata:= [ 0.05,0.1,0.2,0.5,1,2,5,10];
  Adata:=[0.9,0.75,0.6,0.2,0.08,0.06,0.051,0.05];
  TAdata:= zip(`[]`,Tdata,Adata);
  Ydata:=[25,50,75,100,125,150,175,200,225,400,500,700,1000];
  Bdata:=[3250,2500,2000,1725,1550,1400,1325,1275,1225,950,850,775,775];
  YBdata:= zip(`[]`,Ydata,Bdata);
> LSSolve([seq(a*exp(-b*t[1])+c-t[2], t=TAdata)],a=0..2,b=0..10,c=0..0.05);
  abcsol:= %[2]:
[.153978516741551343e-2, [a = 1.01417137085351183, b = 3.44529358752753190, c = .493817324139047345e-1]]
> LSSolve([seq(d*t[1]^e + f*t[1]^g - t[2], t=YBdata)],initialpoint=[d=61875,e=-1,f=775,g=0]);
  defgsol:= %[2]:
[8673.2079345120, [d = 14439.2026115278204, e = -.459166232139629204, f = .694147751171305478e-6, g = 2.79586264024487852]]
> eq:= y = (a*exp(-b*t) + c)*(d*y^e + e*y^f);
  tsol := solve(eq, t);
tsol := -ln(-(-y+c*d*y^e+c*e*y^f)/a/(d*y^e+e*y^f))/b
> tf:= unapply(subs(abcsol,defgsol,tsol),y);
tf := y -> -.2902510264*ln(-.9860266505*(-y+713.0328395/y^.459166232139629204-.2267442401e-1*y^.694147751171305478e-6)/(14439.2026115278204/y^.459166232139629204-.459166232139629204*y^.694147751171305478e-6))
> plot(tf(y),y=25 .. 1000);


 

 

 

If the data are not exact but only approximate, it's probably better to use some sort of least-squares approximation rather than interpolation.
For A(t), it looks to me like a constant plus an exponential might be a good fit.  For B(Y), maybe a linear combination of two powers.
 

> with(Optimization):
  Tdata:= [ 0.05,0.1,0.2,0.5,1,2,5,10];
  Adata:=[0.9,0.75,0.6,0.2,0.08,0.06,0.051,0.05];
  TAdata:= zip(`[]`,Tdata,Adata);
  Ydata:=[25,50,75,100,125,150,175,200,225,400,500,700,1000];
  Bdata:=[3250,2500,2000,1725,1550,1400,1325,1275,1225,950,850,775,775];
  YBdata:= zip(`[]`,Ydata,Bdata);
> LSSolve([seq(a*exp(-b*t[1])+c-t[2], t=TAdata)],a=0..2,b=0..10,c=0..0.05);
  abcsol:= %[2]:
[.153978516741551343e-2, [a = 1.01417137085351183, b = 3.44529358752753190, c = .493817324139047345e-1]]
> LSSolve([seq(d*t[1]^e + f*t[1]^g - t[2], t=YBdata)],initialpoint=[d=61875,e=-1,f=775,g=0]);
  defgsol:= %[2]:
[8673.2079345120, [d = 14439.2026115278204, e = -.459166232139629204, f = .694147751171305478e-6, g = 2.79586264024487852]]
> eq:= y = (a*exp(-b*t) + c)*(d*y^e + e*y^f);
  tsol := solve(eq, t);
tsol := -ln(-(-y+c*d*y^e+c*e*y^f)/a/(d*y^e+e*y^f))/b
> tf:= unapply(subs(abcsol,defgsol,tsol),y);
tf := y -> -.2902510264*ln(-.9860266505*(-y+713.0328395/y^.459166232139629204-.2267442401e-1*y^.694147751171305478e-6)/(14439.2026115278204/y^.459166232139629204-.459166232139629204*y^.694147751171305478e-6))
> plot(tf(y),y=25 .. 1000);


 

 

 

Or reverse the equations with

LinearAlgebra:-GenerateMatrix(map(rhs = lhs, s), [x(t),y(t)]);

 

Or reverse the equations with

LinearAlgebra:-GenerateMatrix(map(rhs = lhs, s), [x(t),y(t)]);

 

To see that the limit is 0 (for 0 < p < 1), you can use the fact that 0 <= binomial(x,k) <= 2^x. The cases p<1/2, p=1/2, p>1/2 must be done separately, because the closed form for the sum is an indeterminate form in the case p=1/2.

> S:= Sum(p^k*(1-p)^(x-k)*x, k=0..x);
  v:= simplify(value(S)) assuming p>0,p<1;

v := 1/(2*p-1)*x*(p^(x+1)-(1-p)^(x+1))

> limit(v,x=infinity) assuming p>0,p<1/2;

0

> limit(v,x=infinity) assuming p>1/2,p<1;

0

> value(eval(S,p=1/2));
(1/2)^x*x*(x+1)
> limit(%,x=infinity);

0

I agree that it's best to use plain text for Maple code, but it is not too hard to access the code in the Maple tag: in my browser (Firefox) I right-click on the image, choose Properties, and the code is in the "Alternate text" field, and can be copied from there.
the image

It might help if you told us what problem you're trying to solve.  I don't have your instructor or textbook, and have no idea what problem "the Rollercoaster" refers to.

It might help if you told us what problem you're trying to solve.  I don't have your instructor or textbook, and have no idea what problem "the Rollercoaster" refers to.

display([seq](
 display([pointplot(S(j*sqrt(2)/50),colour=[red,blue,gold,black]),
 DEplot(sys, [x(t), y(t)], t = 0 .. j*sqrt(2)/50, x = -1 .. 1, y = -1 .. 1, init,  
  thickness = 1, arrows = none, title = sprintf("Animace\n T = %4.4f",j*sqrt(2)/50), 
  linecolor = [red, blue, gold, black])]),
 j=1..50),insequence=true);

display([seq](
 display([pointplot(S(j*sqrt(2)/50),colour=[red,blue,gold,black]),
 DEplot(sys, [x(t), y(t)], t = 0 .. j*sqrt(2)/50, x = -1 .. 1, y = -1 .. 1, init,  
  thickness = 1, arrows = none, title = sprintf("Animace\n T = %4.4f",j*sqrt(2)/50), 
  linecolor = [red, blue, gold, black])]),
 j=1..50),insequence=true);

Sorry, I should have realized that this might not work, because diff(w(x),x) "occurs" inside diff(w(x),x$2) , which is actually stored as diff(diff(w(x),x),x). 

Sorry, I should have realized that this might not work, because diff(w(x),x) "occurs" inside diff(w(x),x$2) , which is actually stored as diff(diff(w(x),x),x). 

Unfortunately it looks to me like the MathMLEditor is even worse than Standard GUI 2D input.  For example, it doesn't like spaces (e.g. x + 1 with spaces around the + produces an error).  I suspect it will be easier to teach your students some simple 1D syntax than to teach them how to use the MathMLEditor.

Unfortunately it looks to me like the MathMLEditor is even worse than Standard GUI 2D input.  For example, it doesn't like spaces (e.g. x + 1 with spaces around the + produces an error).  I suspect it will be easier to teach your students some simple 1D syntax than to teach them how to use the MathMLEditor.

First 109 110 111 112 113 114 115 Last Page 111 of 187