Joe Riel

9660 Reputation

23 Badges

20 years, 17 days

MaplePrimes Activity


These are replies submitted by Joe Riel

The problem I have with using CrossProduct is that it is restricted to 3D. Better to learn how to solve these with out that limitation.

I'm not sure how to solve that, symbolically, with just dsolve.  However, as I hinted previously, it can be done with a little help:

restart;
T := 2;
Et := piecewise(t<=1,t,2-t):
deq := L*diff(q(t),t)+R*diff(q(t),t)+q(t)/C=Et:
dsol := simplify(dsolve({deq,q(0)=q0}));
We now have a general solution for one period. To determine q(n*T) we can use rsolve:

qT := eval(rhs(dsol),t=T);
req := Q(n+1)=eval(qT,q0=Q(n));
rsol := rsolve({req,Q(0)=0},Q(n)); # Assume q(0) = 0.

For n*T <= t <= (n+1)*T the solution is

eval(rhs(dsol), q0=rsol);

I'm not sure how to solve that, symbolically, with just dsolve.  However, as I hinted previously, it can be done with a little help:

restart;
T := 2;
Et := piecewise(t<=1,t,2-t):
deq := L*diff(q(t),t)+R*diff(q(t),t)+q(t)/C=Et:
dsol := simplify(dsolve({deq,q(0)=q0}));
We now have a general solution for one period. To determine q(n*T) we can use rsolve:

qT := eval(rhs(dsol),t=T);
req := Q(n+1)=eval(qT,q0=Q(n));
rsol := rsolve({req,Q(0)=0},Q(n)); # Assume q(0) = 0.

For n*T <= t <= (n+1)*T the solution is

eval(rhs(dsol), q0=rsol);

Look under ?emptysymbol for help on the empty symbol function. 

Thanks for correcting my gibberish francaise.

Look under ?emptysymbol for help on the empty symbol function. 

Thanks for correcting my gibberish francaise.

The name of the command you want is maximize.

The name of the command you want is maximize.

I don't see any reason to use assign a function here.  One can do

f := cos(sqrt(1+sin(x)));
diff(f,x);

I don't see any reason to use assign a function here.  One can do

f := cos(sqrt(1+sin(x)));
diff(f,x);

While rather nonintuitive, that can be accomplished with the Mma subpackage of the MmaTranslator package:

MmaTranslator:-Mma:-BitAnd(8,25); 
                                                      8
See the help page for additonal functions.

A nicer way to do that is with CurveFitting:

f := 1/(k^2+3*k+1):
pts := [seq([k,f],k=1..10)];
pts := [[1, 1/5], [2, 1/11], [3, 1/19], [4, 1/29], [5, 1/41], [6, 1/55],

    [7, 1/71], [8, 1/89], [9, 1/109], [10, 1/131]]

CurveFitting:-RationalInterpolation(pts,n);
                                      1
                                 ------------
                                      2
                                 1 + n  + 3 n

A nicer way to do that is with CurveFitting:

f := 1/(k^2+3*k+1):
pts := [seq([k,f],k=1..10)];
pts := [[1, 1/5], [2, 1/11], [3, 1/19], [4, 1/29], [5, 1/41], [6, 1/55],

    [7, 1/71], [8, 1/89], [9, 1/109], [10, 1/131]]

CurveFitting:-RationalInterpolation(pts,n);
                                      1
                                 ------------
                                      2
                                 1 + n  + 3 n

See www.mapleprimes.com/blog/joe-riel/emacs-mode-for-maple. If you use Debian, it is available with the emacs-goodies package, though latest version needs some work.  Contact me if you have problems (I'm the author of that package).

See www.mapleprimes.com/blog/joe-riel/emacs-mode-for-maple. If you use Debian, it is available with the emacs-goodies package, though latest version needs some work.  Contact me if you have problems (I'm the author of that package).

One has to respect Maplesoft's copyrights.  Copying new additions to libraries is presumably neither legal nor ethical. User generated patches should be fine, but they would have to be distributed as such, I assume.  That is, one couldn't just patch a library (or a procedure from a library) and make the patched version available.  Rather, the  patch itself would have to be distributed and the users would apply it to their own copies of the Maple libraries.

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