Robert Israel

6577 Reputation

21 Badges

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

MaplePrimes Activity


These are replies submitted by Robert Israel

Why did you say that wasn't what you wanted?  That was it exactly.  Or you could use implicitdiff to get an equivalent result.  Then replace diff(y(x),x) with -1/diff(y(x),x) to get a differential equation for the orthogonal trajectories.

 

You made no assumption on x.  Basically I think the problem that Maple needs to worry about is that the antiderivative may have a discontinuity (see e.g. the thread  Maple Integration Error).  Certainly there is likely to be trouble if the integrand itself went to infinity, which could happen if x was imaginary.

I'm not sure what you mean by

"Instead of just outputting the matrix for aesthetics, how can i then pass those values on to a matrix P?"

My procedure matrixMaplet returns the Matrix, and you can do whatever you wish with the result, for example assign it to P:

P := matrixMaplet(3,4);

A useful addition to matrixMaplet might be an optional third argument that provides initial values for the entries.  Thus:

matrixMaplet:= proc(m::posint, n::posint, 
   M::{Matrix,matrix,listlist})
     local maplet, M0;
     uses Maplets[Elements];
     if nargs = 3 then M0 := M
     else M0 := Matrix(m,n)
     end if;   
     maplet:= Maplet([
         ["Edit the matrix, please"],
         seq([seq(TextBox[_entry||i||j]('width' = 5,
              'value'=M0[i,j]),j = 1..n)],
             i = 1..m),
         [Button("Done",
           Shutdown([seq(seq(_entry||i||j,j=1..n),i=1..m)]))]
        ]);
   Matrix(m,n,map(parse,Maplets[Display](maplet)));
  end proc:

Q:= <<1,2>|<3,4>|<5,6>>;
Q:= matrixMaplet(2, 3, Q);

 

I'm not sure what you mean by

"Instead of just outputting the matrix for aesthetics, how can i then pass those values on to a matrix P?"

My procedure matrixMaplet returns the Matrix, and you can do whatever you wish with the result, for example assign it to P:

P := matrixMaplet(3,4);

A useful addition to matrixMaplet might be an optional third argument that provides initial values for the entries.  Thus:

matrixMaplet:= proc(m::posint, n::posint, 
   M::{Matrix,matrix,listlist})
     local maplet, M0;
     uses Maplets[Elements];
     if nargs = 3 then M0 := M
     else M0 := Matrix(m,n)
     end if;   
     maplet:= Maplet([
         ["Edit the matrix, please"],
         seq([seq(TextBox[_entry||i||j]('width' = 5,
              'value'=M0[i,j]),j = 1..n)],
             i = 1..m),
         [Button("Done",
           Shutdown([seq(seq(_entry||i||j,j=1..n),i=1..m)]))]
        ]);
   Matrix(m,n,map(parse,Maplets[Display](maplet)));
  end proc:

Q:= <<1,2>|<3,4>|<5,6>>;
Q:= matrixMaplet(2, 3, Q);

 

> f:= x/(x^2+y^2+z^2)^(3/2);
   F1:= int(f,z=-b..b) assuming positive;

F1 := 2/(x^2+y^2+b^2)^(1/2)*b/(x^2+y^2)*x

So far so good

> Q:=int(F1,y=c..a+c) assuming positive;

Q := -I*arctanh((b^2+c*x*I+x^2)/b/(b^2+c^2+x^2)^(1/2))-I*arctanh((-b^2+c*x*I-x^2)/b/(b^2+c^2+x^2)^(1/2))+arctanh((b^2+a*x*I+c*x*I+x^2)/b/(2*a*c+c^2+x^2+a^2+b^2)^(1/2))*I+arctanh((-b^2+a*x*I+c*x*I-x^2)/b/(2*a*c+c^2+x^2+a^2+b^2)^(1/2))*I

It's curious that Maple finds an integral that appears complex, even though (under the assumption that x, a, b, c are all positive) the integral should obviously be real.

> F2:= simplify(evalc(int(F1,y))) assuming positive;

F2 := -arctan(x*y/(x^2+b^2+b*(x^2+y^2+b^2)^(1/2)))+1/2*arctan(-x*y,b*(x^2+y^2+b^2)^(1/2)-x^2-b^2)-1/2*arctan(x*y,b*(x^2+y^2+b^2)^(1/2)-x^2-b^2)

> Q := eval(F2,y=a+c) - eval(F2, y=c);

Q := -arctan(x*(a+c)/(x^2+b^2+b*(x^2+(a+c)^2+b^2)^(1/2)))+1/2*arctan(-x*(a+c),b*(x^2+(a+c)^2+b^2)^(1/2)-x^2-b^2)-1/2*arctan(x*(a+c),b*(x^2+(a+c)^2+b^2)^(1/2)-x^2-b^2)+arctan(x*c/(x^2+b^2+b*(b^2+c^2+x^2)^(1/2)))-1/2*arctan(-x*c,b*(b^2+c^2+x^2)^(1/2)-x^2-b^2)+1/2*arctan(x*c,b*(b^2+c^2+x^2)^(1/2)-x^2-b^2)

 

I have no trouble using display with several contourplot3d's.  It's hard to tell what's gone wrong from this distance.  Can you upload your worksheet?

What I wrote is a solution of the equation as you wrote it: D*diff(c(x,t),t)=diff(c(x,t),x,x).
I think it's more common to write the equation as diff(c(x,t),t)=D*diff(c(x,t),x,x), and that would explain the formulas you see in Crank.

I don't know if there is a closed-form solution for the case where the diffusion constant is different in the two materials. 

What I wrote is a solution of the equation as you wrote it: D*diff(c(x,t),t)=diff(c(x,t),x,x).
I think it's more common to write the equation as diff(c(x,t),t)=D*diff(c(x,t),x,x), and that would explain the formulas you see in Crank.

I don't know if there is a closed-form solution for the case where the diffusion constant is different in the two materials. 

Well, you could do something like this with convertsys:

> de := diff(y(t), t$2) + diff(y(t),t)+y(t) = 0:
   convertsys({de}, [], y(t), t, Y,YP);
   sys:= eval(%[1],[YP=diff([y(t),v(t)],t),Y=[y(t),v(t)]]);

But that's no better than doing it on your own without convertsys:

> sys := [diff(y(t), t) = v(t), 
    isolate(subs(diff(y(t),t)=v(t), de),diff(v(t),t))];

 

Well, you could do something like this with convertsys:

> de := diff(y(t), t$2) + diff(y(t),t)+y(t) = 0:
   convertsys({de}, [], y(t), t, Y,YP);
   sys:= eval(%[1],[YP=diff([y(t),v(t)],t),Y=[y(t),v(t)]]);

But that's no better than doing it on your own without convertsys:

> sys := [diff(y(t), t) = v(t), 
    isolate(subs(diff(y(t),t)=v(t), de),diff(v(t),t))];

 

What is the particular LF in this case?  Do assumptions such as  t::real
make a difference (depending on what LF is, that might be necessary for convergence)?

 

 

Why?  Because that's the way the software was designed.  But you do have a point: this is a common enough situation that I think it would be worthwhile to have an option for phaseportrait to automatically transform a second-order DE to a system. 

 

Why?  Because that's the way the software was designed.  But you do have a point: this is a common enough situation that I think it would be worthwhile to have an option for phaseportrait to automatically transform a second-order DE to a system. 

 

I've never encountered this word (which doesn't prove anything, but I've been a mathematician for a long time).  Oxford English Dictionary, dictionary.com, wikipedia, MathWorld, and Maple's own math dictionary have nothing on it.  On the other hand, google does turn up about 375 hits, including quite a number of research papers.  Of those I looked at, all had Chinese authors. 

I've never encountered this word (which doesn't prove anything, but I've been a mathematician for a long time).  Oxford English Dictionary, dictionary.com, wikipedia, MathWorld, and Maple's own math dictionary have nothing on it.  On the other hand, google does turn up about 375 hits, including quite a number of research papers.  Of those I looked at, all had Chinese authors. 

First 142 143 144 145 146 147 148 Last Page 144 of 187