MaplePrimes Questions

dsolve(diff(r(t),t$1)=-r(t)*(-1+r(t)^2));

                       1                                  1           
     r(t) = ------------------------, r(t) = - ------------------------

Here's an interesting problem from a colleague. Consider the following two improper integrals; the only difference is the absolute value in the integrand. I think this is another instance in which Maple mis-applies the FTOC.

restart;
with( IntegrationTools ):
#infolevel[all]:=3:
q := x*sin(1/x^2)-cos(1/x^2)/x;
                                            /1 \
                                         cos|--|
                                            | 2|
                                  /1 \      \x /
                             x sin|--| - -------
                                  | 2|      x   
                                  \x /          
I0 := Int( q, x=0..1 ):
I1 := Int( abs(q), x=0..1 ):

Maple gives values for both integrals.

value( I0 );
                                  1       
                                  - sin(1)
                                  2       
value( I1 );
                                  1       
                                  - sin(1)
                                  2       

It's a little odd that these two answers came out the same. It's easy to see that q does change signs infinitely often in [0,1]. A nice visualization of this can be obtained with:

plot([1/x,abs(q)],x=0..1,y=0..50);

We can dig a little deeper by looking at the values of the definite integrals on [A,1] and taking a limit as A->0.

int( q, x=A..1 );
                            1  2    /1 \   1       
                          - - A  sin|--| + - sin(1)
                            2       | 2|   2       
                                    \A /           
int(abs(q),x=A..1);
                        / 2    /1 \      /1 \\                   
                        |A  sin|--| - cos|--||                   
                        |      | 2|      | 2||                   
             1  2       |      \A /      \A /|    /1 \   1       
           - - A  signum|--------------------| sin|--| + - sin(1)
             2          \         A          /    | 2|   2       
                                                  \A /           

This starts to show where Maple is missing some important information. More is seen by looking at the antiderivatives of q and abs(q):

Q := int(q,x);
                                1  2    /1 \
                                - x  sin|--|
                                2       | 2|
                                        \x /
Q2 := int( abs(q), x );
                             / 2    /1 \      /1 \\        
                             |x  sin|--| - cos|--||        
                             |      | 2|      | 2||        
                  1  2       |      \x /      \x /|    /1 \
                  - x  signum|--------------------| sin|--|
                  2          \         x          /    | 2|
                                                       \x /

plot( [q, Q], x=0..1, view=[DEFAULT,-5..5] ):

plot( [abs(q), Q2], x=0..1, view=[DEFAULT,-1..5] );


plot( [Q,Q2], x=0..0.6, thickness=[3,1], discont=true );

Clearly, the two improper integrals at the start of this post should not have the same values.

Let's convert the problem to an improper integral on [1,infinity) by making a substitution x=1/u. When Maple makes this change of variable, it finds:

I2 := Change( I1, x=1/u );
                      /infinity       / 2\      / 2\  2   
                     |            -sin\u / + cos\u / u    
                   - |          - --------------------- du
                     |                      3             
                    /1                     u              

It's a little interesting that the absolute values have disappeared. (A plot quickly shows that this integrand is not always an increasing function.

q2 := GetIntegrand( Combine(I2) );
                                / 2\      / 2\  2
                            -sin\u / + cos\u / u 
                            ---------------------
                                      3          
                                     u           
plot( q2, u=1..50 );

What gets really interesting is the value of this integral:

 

value( I2 );
                                   1       
                                 - - sin(1)
                                   2       

Maple returns the same value for the definite integral with the correct (absolute value) in the integrand. Once again it is surprising that Maple reports the same values for these two integrals. But, the fact that these values are negative - even when the integrand is non-negative - is alarming.

It does appear that in some cases Maple is able to detect and correctly handle an infinite number of discontinuities in the antiderivative:

int(abs(cos(v)/v),v=1..infinity);
                /1   \
     -Ci(1) + Ci|- Pi|
                \2   /

          /infinity                                                   \
          | -----                                                     |
          |  \                                                        |
          |   )    /  /1           \     _k     /3           \     _k\|
        + |  /     |Ci|- Pi + Pi _k| (-1)   - Ci|- Pi + Pi _k| (-1)  ||
          | -----  \  \2           /            \2           /       /|
          \ _k = 0                                                    /
evalf( % );
                               Float(infinity)

 

 

Okay, I have a simple 5 X 5 matrix.  How do I view it as an image?

 

With a very large image 1000 X 1000, I can left click on it and view the matrix in a spreadsheet and then click on a tab that says image and view that matrix as an image.  How do I do that with small maticies?  I can't figure it out.

I have an  ode system, and use  2 D Math  (I don't know how to copy here, so I type by hand)

x'(t) = -y(t) + x(t) (1 - x^2(t)  -  y^2(t)),

y'(t) = x(t) + y(t) (1 - x^2(t) - y^2(t)).

I would like to introduce  x(t) = r(t) cos(Theta(t)), y(t) = r(t) sin(Theta(t)) and manipulate the equations further.

The problem is the left hand side. In one case I obtain Dx(t), in the other case (r(t) cos(Theta(t))' without calculation on it.

I ask some help. Thanks.

Hi guys

 

How can i construct the standard vector e[i]. Where e[i] is a 4 dimensional vector with 0 in all entries apart from the ith which has ?

Hello there, Would appreciate if someone could illustrate the procedure to obtain, using the plot3d command, simply the solid bound by the given set of graphs. In other words, all superfluous areas are substracted. For example, for the cone z=sqrt(x^2 + y^2) & planes z=2 & z=4, I'd like to see just the solid bound by the planes and not what appears when the following commands are executed: a:=implicitplot3d(z = sqrt(x^2+y^2), x = -5 .. 5, y = -5 .. 5, z = -5 .. 5); b:=implicitplot3d(z = 2, x = -5 .. 5, y = -5 .. 5, z = -5 .. 5);

Hi Guys, i have a forloop problem.

I have a nxs matrix, where s=sum((k),k=1..n-1), so when n=3, s=3, when n=4,s=6 and so on.

I need to code each column number lexicographically for cartesian pair (i,j) where i<j, so when n=3, the columns would be

 

(1,2),(1,3),(2,3)

and when n=4 we have

(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)

.

Is there a spherical harmonics package available anywhere ?

 

I may have to start using vector spherical harmonics and don't really feel like fighting with Maple, and the Legendre and Associated Legendre functions on my own.

 

v/r,

 

Hello, I have a question regarding the behavior of the numeric event division_by_zero. The documentation of ?event says that "A division of a non-0 number by 0 should signal a division_by_zero event. The default action is to return a correctly signed infinity, if possible, and otherwise an undefined. This event is also properly signaled when an attempt is made to evaluate a function at an infinite singularity, e.g., ln(0)." Yet, when using the default settings, I get the following output: > NumericEventHandler( division_by_zero = default ): > 1/0;

I been trying to make a Maplet that will solve some numerical analysis problems, those problems or indeen the solution of them are composed of iterations.

I would like to show such value iterations on a table in a Maplet interface, with no success.

for my logic, this should work.

Set('Table1',[[1,2],[3,4],[3,4]])

But I get an error telling me that the value is not settable.

It doesn't make sense to me to have a control that I can't modify its contents at runtime?

Any ideas about how to do this?

 

Thanks

Hey,

I am doing some ODEs and I met the following problem...

 

The original problem is

 

y(x)*(y(x)-2*x)*diff(y(x),x)=1;

 

and knowing the solutions contains efr function.

 

After several lines of calculation I got

Int(y^2*exp(1)^(y^2),y);

 

 

then maple gives me the answer

 

1/2*y*exp(y^2)+1/4*I*Pi^(1/2)*erf(y*I)

 

Hey

 

Can someone have a look at this

 

restart:

int(-m*(m-2)/(-1+m^3-2*m^2),m);

 

maple gives me

 

-sum(_R*(_R-2)/(3*_R^2-4*_R)*ln(m-_R),_R = RootOf(-1+_Z^3-2*_Z^2))

 

what dose this imply?

 

Thanks in advance

Hey

I have gone through all the maple videos that are linked to from the Maple Software, and was just wondering if anyone knows of any other places on the net where i can get maple videos, for free or paid?

I have learnt ten times more watching the videos than i did when using a book.

I still get stuck, but then i just come on here and ask.

 

Thanks All

Hello,

I am trying to get Maple to help me solve an integral equation.  I tried the solve command, which I suspected wouldn't work.  I was right, but I do not know how else to approach the problem.  Here is what I did:

 

solve(int(f(t), t = 1 .. x) = 5*x^2+7*x-3, f(t))

 

Of course this produced an error.  Any suggestions?  Thank you.

Hi everybody,
I would like to speed up my program because it is very slow for large input data
this program calculate arithmetic coding for input data

input:=[144,144,108,94,92,93,96,96,96,96,96,99,95,101,101,97,98,93,95,100,96,94,95,98,97,95]:
 R:=[seq(j,j=0..255)]:
# calculate frequency table 
p:=proc(x)
local k;
global cp:
cp:=0:
for k to N do
if (input[k]=x) then cp:=cp+1 fi
od:
cp/N
end:
G:=[seq(p(i),i=0..255)];

First 2190 2191 2192 2193 2194 2195 2196 Last Page 2192 of 2364