PatrickT

Dr. Patrick T

2163 Reputation

18 Badges

16 years, 335 days

MaplePrimes Activity


These are replies submitted by PatrickT

you can also save yourself the trouble of typing the $ sign every time by bringing it inside the preamble code, for instance this way:

\def\MapleOutput#1{{\begin{center}\begin{math}\color{MapleBlue}{#1}\end{math}\end{center}}}

then you simply enter this:

\MapleOutput{a:=0}
 

No more forgotten dollar signs!

you can also save yourself the trouble of typing the $ sign every time by bringing it inside the preamble code, for instance this way:

\def\MapleOutput#1{{\begin{center}\begin{math}\color{MapleBlue}{#1}\end{math}\end{center}}}

then you simply enter this:

\MapleOutput{a:=0}
 

No more forgotten dollar signs!

The color I named pink is actually called magenta, to be accurate.

The color I named pink is actually called magenta, to be accurate.

very nice Roman, thanks, I had looked for that in the past. Thanks for sharing.

Below is a colored version of your code:

\documentclass{article}

\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{MapleRed}{rgb}{1,0,0}
\definecolor{MapleBlue}{rgb}{0,0,1}
\definecolor{MaplePink}{rgb}{1,0,1}

\def\MapleInput#1{\noindent{{\small $>$ {\tt \color{MapleRed}{#1} }}}}
\def\MapleOutput#1{{\begin{center} \color{MapleBlue}{#1} \end{center}}}
\def\MapleWarning#1{\noindent{{\small {\tt \color{MaplePink}{#1} }}}}


\begin{document}

\section{Example of Usage}

\MapleInput{a := 0;}
\MapleOutput{$a:=0$}
\MapleWarning{Error, numeric exception: division by zero}

\end{document}

 

(I made up the colors, they seem to match my screen output, but I cannot guarantee that they are exactly Maple's true colors)

very nice Roman, thanks, I had looked for that in the past. Thanks for sharing.

Below is a colored version of your code:

\documentclass{article}

\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{MapleRed}{rgb}{1,0,0}
\definecolor{MapleBlue}{rgb}{0,0,1}
\definecolor{MaplePink}{rgb}{1,0,1}

\def\MapleInput#1{\noindent{{\small $>$ {\tt \color{MapleRed}{#1} }}}}
\def\MapleOutput#1{{\begin{center} \color{MapleBlue}{#1} \end{center}}}
\def\MapleWarning#1{\noindent{{\small {\tt \color{MaplePink}{#1} }}}}


\begin{document}

\section{Example of Usage}

\MapleInput{a := 0;}
\MapleOutput{$a:=0$}
\MapleWarning{Error, numeric exception: division by zero}

\end{document}

 

(I made up the colors, they seem to match my screen output, but I cannot guarantee that they are exactly Maple's true colors)

I really meant to write "it may yield to your skill"

I really meant to write "it may yield to your skill"

I noticed what must be a typo in your equations, but didn't think it would matter. I've just had time to look at it more closely, finally, and it appears that the corrected equations cannot be reduced in the manner shown -- or to put it more precisely, I haven't been able to adapt the method to the corrected equations.

The typo is that the system

> newsys:=  [diff(x(t),t) = (x(t)^(1/2)-1/20*x(t)-C(t))^2, 
      diff(C(t),t) = 1/2*(1/2*1/(x(t)^(1/2))-1/20-Q(t))*C(t)*(x(t)^(1/2)-1/20*x(t)-C(t)), 
      diff(Q(t),t) = (Q(t)-1/50)*(3/100-Q(t))*(x(t)^(1/2)-1/20*x(t)-C(t))

+1/2*(Q(t)-1/40)*(1/2*1/x(t)-1/20-Q(t))*C(t)];

should instead be:
 

> newsys:=  [diff(x(t),t) = (x(t)^(1/2)-1/20*x(t)-C(t))^2, 
      diff(C(t),t) = 1/2*(1/2*1/(x(t)^(1/2))-1/20-Q(t))*C(t)*(x(t)^(1/2)-1/20*x(t)-C(t)), 
      diff(Q(t),t) = (Q(t)-1/50)*(3/100-Q(t))*(x(t)^(1/2)-1/20*x(t)-C(t)

+1/2*(Q(t)-1/40)*(1/2*1/x(t)^(1/2))-1/20-Q(t))*C(t)];

in other words there is a square root missing in the last line.
 

If I correct the equation and apply the set of transformations shown in Robert's post, I get:

J := simplify(eval(VectorCalculus[Jacobian](F,[u,v,w]),{u=0,v=0,w=0}));
                             [0      0      0]
                             [               ]
                             [0      0      0]
                        J := [               ]
                             [      -1       ]
                             [0    -----    0]
                             [     40000     ]

In fact, if I use the following more general transformation:

 

newvars := {
> x(t) = u(t) + 400/9,
> Q(t) = w(t) + 1/40 + y1*v(t),
> C(t) = v(t) + sqrt(u(t)+400/9) - 1/20*(u(t)+400/9) + y2*w(t)
> };

 

I get:


J := simplify(eval(VectorCalculus[Jacobian](F,[u,v,w]),{u=0,v=0,w=0}));
            [0             0                       0          ]
            [                                                 ]
            [                                        2        ]
            [               y2                     y2         ]
       J := [0    - ------------------    - ------------------]
            [       40000 (-1 + y2 y1)      40000 (-1 + y2 y1)]
            [                                                 ]
            [              1                       y2         ]
            [0     ------------------      ------------------ ]
            [      40000 (-1 + y2 y1)      40000 (-1 + y2 y1) ]

 

There appears to be no simple way to choose y1 and y2 to diagonalize the system.

My main question at this stage seems to be : how can I select transformations that will diagonalize the system? Or maybe I don't need to diagonalize the system at all?

From my questions you will be able to see that I am quite lost. My problem is more of a math problem than, strictly speaking, a Maple problem! Hints will be greatly appreciated. And thanks again Robert, I'd have given up long ago without your help.

 

 

 

 

 

 

I noticed what must be a typo in your equations, but didn't think it would matter. I've just had time to look at it more closely, finally, and it appears that the corrected equations cannot be reduced in the manner shown -- or to put it more precisely, I haven't been able to adapt the method to the corrected equations.

The typo is that the system

> newsys:=  [diff(x(t),t) = (x(t)^(1/2)-1/20*x(t)-C(t))^2, 
      diff(C(t),t) = 1/2*(1/2*1/(x(t)^(1/2))-1/20-Q(t))*C(t)*(x(t)^(1/2)-1/20*x(t)-C(t)), 
      diff(Q(t),t) = (Q(t)-1/50)*(3/100-Q(t))*(x(t)^(1/2)-1/20*x(t)-C(t))

+1/2*(Q(t)-1/40)*(1/2*1/x(t)-1/20-Q(t))*C(t)];

should instead be:
 

> newsys:=  [diff(x(t),t) = (x(t)^(1/2)-1/20*x(t)-C(t))^2, 
      diff(C(t),t) = 1/2*(1/2*1/(x(t)^(1/2))-1/20-Q(t))*C(t)*(x(t)^(1/2)-1/20*x(t)-C(t)), 
      diff(Q(t),t) = (Q(t)-1/50)*(3/100-Q(t))*(x(t)^(1/2)-1/20*x(t)-C(t)

+1/2*(Q(t)-1/40)*(1/2*1/x(t)^(1/2))-1/20-Q(t))*C(t)];

in other words there is a square root missing in the last line.
 

If I correct the equation and apply the set of transformations shown in Robert's post, I get:

J := simplify(eval(VectorCalculus[Jacobian](F,[u,v,w]),{u=0,v=0,w=0}));
                             [0      0      0]
                             [               ]
                             [0      0      0]
                        J := [               ]
                             [      -1       ]
                             [0    -----    0]
                             [     40000     ]

In fact, if I use the following more general transformation:

 

newvars := {
> x(t) = u(t) + 400/9,
> Q(t) = w(t) + 1/40 + y1*v(t),
> C(t) = v(t) + sqrt(u(t)+400/9) - 1/20*(u(t)+400/9) + y2*w(t)
> };

 

I get:


J := simplify(eval(VectorCalculus[Jacobian](F,[u,v,w]),{u=0,v=0,w=0}));
            [0             0                       0          ]
            [                                                 ]
            [                                        2        ]
            [               y2                     y2         ]
       J := [0    - ------------------    - ------------------]
            [       40000 (-1 + y2 y1)      40000 (-1 + y2 y1)]
            [                                                 ]
            [              1                       y2         ]
            [0     ------------------      ------------------ ]
            [      40000 (-1 + y2 y1)      40000 (-1 + y2 y1) ]

 

There appears to be no simple way to choose y1 and y2 to diagonalize the system.

My main question at this stage seems to be : how can I select transformations that will diagonalize the system? Or maybe I don't need to diagonalize the system at all?

From my questions you will be able to see that I am quite lost. My problem is more of a math problem than, strictly speaking, a Maple problem! Hints will be greatly appreciated. And thanks again Robert, I'd have given up long ago without your help.

 

 

 

 

 

 

Now that was a long flight -- it has taken me nearly 2 months to get organized again. No it wasn't the onflight food. It wasn't so much the fact that we moved into a new place and all that, it's that a little boy is keeping us all busy. I did not expect it to be so overwhelming. Newborns have their way. Something to learn everyday! So now I'm trying to get back on track and I've got to get back to this problem and try to nail it at last!

Now that was a long flight -- it has taken me nearly 2 months to get organized again. No it wasn't the onflight food. It wasn't so much the fact that we moved into a new place and all that, it's that a little boy is keeping us all busy. I did not expect it to be so overwhelming. Newborns have their way. Something to learn everyday! So now I'm trying to get back on track and I've got to get back to this problem and try to nail it at last!

Thank you Robert, you are ever so kind. This is an incredibly detailed answer. I will read your comments carefully and get back to you in a couple of days (I am just about to make a long flight and may not have access to internet for a few days).

So often in the past, you have helped me see things that I may never have been able to see by myself.

Like so many have said on this and other discussion forums, you're my hero Robert! ;-)

Thank you Robert, you are ever so kind. This is an incredibly detailed answer. I will read your comments carefully and get back to you in a couple of days (I am just about to make a long flight and may not have access to internet for a few days).

So often in the past, you have helped me see things that I may never have been able to see by myself.

Like so many have said on this and other discussion forums, you're my hero Robert! ;-)

same here, If there were a poll, my guess is that an overwhelming majority of users would say that.

First 82 83 84 85 86 87 88 Last Page 84 of 93