Preben Alsholm

13471 Reputation

22 Badges

20 years, 250 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@pagan If a function is not defined at a point, the question of its possible continuity or differentiability at that point cannot come up.

Notice also that the help page for isdifferentiable specifically refers to piecewise defined functions.
?isdifferentiable
f:=piecewise(x=3,7,1/(x-3)):
             
isdifferentiable(f,x,1);
                             false
isdifferentiable(1/(x-3),x,1);
                              true


@snackman 

Integrate eqn1 from s = 0 to s = 1.5:

int(15*(diff(theta(s), s, s)), s = 0 .. 1.5) = int(N3*cos(theta(s))-N1*sin(theta(s)), s = 0 .. 1.5);

Now the requirements eqn4, eqn5 and bcns imply that the right hand side is just N3.

Thus 15*(D(theta)(1.5)-D(theta)(0)) = N3.

But from the equation for diff(theta(s),s) we find (taking signs into account!):

D(theta)(0) = - sqrt( (2/15)*N1 + C)

D(theta)(1.5) = sqrt( (2/15)*N1 + C)

By combining these results, C is easily found.

@snackman 

Integrate eqn1 from s = 0 to s = 1.5:

int(15*(diff(theta(s), s, s)), s = 0 .. 1.5) = int(N3*cos(theta(s))-N1*sin(theta(s)), s = 0 .. 1.5);

Now the requirements eqn4, eqn5 and bcns imply that the right hand side is just N3.

Thus 15*(D(theta)(1.5)-D(theta)(0)) = N3.

But from the equation for diff(theta(s),s) we find (taking signs into account!):

D(theta)(0) = - sqrt( (2/15)*N1 + C)

D(theta)(1.5) = sqrt( (2/15)*N1 + C)

By combining these results, C is easily found.

A minor modification (admittedly making the technique more complicated)  makes it possible to avoid determining the points of intersection:

plottools[transform]((x,y) -> [x,y + x + 5])(plot(min(x^2-x-5,0),x=-3..4,filled=true));

A minor modification (admittedly making the technique more complicated)  makes it possible to avoid determining the points of intersection:

plottools[transform]((x,y) -> [x,y + x + 5])(plot(min(x^2-x-5,0),x=-3..4,filled=true));

Your integrand is not only oscillating, it is oscillating wildly.

Even on a much smaller interval you will have problems.

This works though:

evalf(Int(sin(x^19),x=0..2,method = _d01akc,maxintervals=10000));
                         0.08028631940

See ?evalf,Int

Preben Alsholm

I don't know what you are trying to do, but I would start like this:

restart;
C:=Vector(3):
A := evalf(Matrix([[2, -1, sqrt(2)], [3, 2, -3], [3, sqrt(2), -15/7]]));
B := evalf(<5+7*sqrt(2), -24, -12-3*sqrt(2)>);
N := 3: t := 1e-6:
P := evalf((1/2)*sqrt(t*N)):

You don't need the packages linalg and student, and they are superseded anyway by the LinearAlgebra and the Student packages.

Preben Alsholm

I don't know what you are trying to do, but I would start like this:

restart;
C:=Vector(3):
A := evalf(Matrix([[2, -1, sqrt(2)], [3, 2, -3], [3, sqrt(2), -15/7]]));
B := evalf(<5+7*sqrt(2), -24, -12-3*sqrt(2)>);
N := 3: t := 1e-6:
P := evalf((1/2)*sqrt(t*N)):

You don't need the packages linalg and student, and they are superseded anyway by the LinearAlgebra and the Student packages.

Preben Alsholm

The removal of evalf in my previous comment could be replaced by the version below, which seems to take care of the title problem.

The first change to `plots/animate` is the same as before.

`plots/animate`:=subs(subs=((x,y)->eval(y,x)),eval(`plots/animate`)):
`plots/animate`:=subs(evalf=(proc(x::uneval) local a;a:=[eval(x)];if _npassed>1 then evalf(a[1],_rest) else op(a) end if;end proc), eval(`plots/animate`)):
`plots/animate`:=subs(numeric=realcons,eval(`plots/animate`)):


Preben Alsholm

The removal of evalf in my previous comment could be replaced by the version below, which seems to take care of the title problem.

The first change to `plots/animate` is the same as before.

`plots/animate`:=subs(subs=((x,y)->eval(y,x)),eval(`plots/animate`)):
`plots/animate`:=subs(evalf=(proc(x::uneval) local a;a:=[eval(x)];if _npassed>1 then evalf(a[1],_rest) else op(a) end if;end proc), eval(`plots/animate`)):
`plots/animate`:=subs(numeric=realcons,eval(`plots/animate`)):


Preben Alsholm

@Preben Alsholm 

Besides finding 'a' in Alec Mihailov's original post you can find the value of the sum b by using the exact values of sums that are related:

b:=Sum(ln(n)/n/(n-1),n=2..infinity);
                              infinity         
                               -----           
                                \              
                                 )      ln(n)  
                                /     ---------
                               -----  n (n - 1)
                               n = 2           
c2:=Sum(ln(n)/n^2,n=2..infinity);
                                infinity     
                                 -----       
                                  \          
                                   )    ln(n)
                                  /     -----
                                 -----    2  
                                 n = 2   n   
c3:=Sum(ln(n)/n^3,n=2..infinity);
                                infinity     
                                 -----       
                                  \          
                                   )    ln(n)
                                  /     -----
                                 -----    3  
                                 n = 2   n   
b0:=factor(combine(b-c2-c3));
                             infinity          
                              -----            
                               \               
                                )      ln(n)   
                               /     ----------
                              -----   3        
                              n = 2  n  (n - 1)
evalf(b0+value(c2+c3));
                                 1.257746887

Preben Alsholm

Yes, that bug is old. I told Maple about it a long time ago, on October 10 2007.

The answer I got was:

"We have entered this issue into our internal bug-tracker. Thank you for bringing this to our attention."

The Maple version then must have been Maple 11. But nothing changed in Maple 12 or 13.

I still (!) don't have Maple 14.

The remedy I use, and which I also suggested at the time, is to replace the occurrences of subs with eval.

I have used the following redefinition with success and seemingly with no bad side effects:

`plots/animate`:=subs(subs=((x,y)->eval(y,x)),eval(`plots/animate`)):

Preben Alsholm

Yes, that bug is old. I told Maple about it a long time ago, on October 10 2007.

The answer I got was:

"We have entered this issue into our internal bug-tracker. Thank you for bringing this to our attention."

The Maple version then must have been Maple 11. But nothing changed in Maple 12 or 13.

I still (!) don't have Maple 14.

The remedy I use, and which I also suggested at the time, is to replace the occurrences of subs with eval.

I have used the following redefinition with success and seemingly with no bad side effects:

`plots/animate`:=subs(subs=((x,y)->eval(y,x)),eval(`plots/animate`)):

Preben Alsholm

Sum(ln(1+1/n)/n,n=1..N) = Sum(ln(n)/n/(n-1),n=2..N+1)+ln(N+1)/(N+1);

so the two infinite series have the same sum. Convergence follows by comparison to Sum(ln(n)/n^2,n=2..infinity), which is seen to be convergent by using e.g. the integral test.

 

Preben Alsholm

I guess it is related to the fact that `evalf/Sum` (in Maple 13) cannot handle this simpler one either:

Sum(ln(n)/n^2,n=2..infinity);

In this case though, sum can find an expression for the sum,  -Zeta(1, 2) , and that is known to evalf.

Also evalf(Sum(ln(n)/n^3,n=2..infinity)) fails, but evalf(Sum(ln(n)/n^4,n=2..infinity)) is OK.

Preben Alsholm

 

First 216 217 218 219 220 221 222 Page 218 of 225