Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 359 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

It follows from consideration of the integral test for the convergence of series that

int(1/n^2, n= N+1..infinity)  < Pi^2/6 - sum(1/n^2, n= 1..infinity) < int(1/n^2, n= N..infinity).

Doing the integrals, we get

1/(N+1) < Pi^2/6 - sum(1/n^2, n= 1..infinity) < 1/N.

From this, it follows that the answer to the OP's problem is ceil(1/.001) = 1000.

@Mac Dude

Yes, using add rather than sum will fix the indexing error.

George: I see that you are trying to do a least-squares nonlinear fit for the parameter b. There are already commands to do this such as Statistics:-NonlinearFit and DirectSearch:-DataFit. But they are unstable on your problem. The just want to push to higher and higher values. I suspect that you will get nowhere trying to do the least squares directly.

@Alejandro Jakubi Note that contourplot3d, which is implemented at a lower level than the Maple language, does not have any problem drawing the contours as perfect circles.

@pitzz I updated my Answer to solve for R instead of U. In the original I stupidly solved it for U, which it was already solved for!

@dgem 

Yes, but what do you want to do with the color? The easiest thing to do would be to have the color vary continuously through the standard color spectrum (red to violet) over the whole animation. Like this:

nThicknesses:= 64:  nStyles:= 8:
plots:-display([
     seq(seq(
          plot(exp(-x^2)*sin(Pi*x), x= -2..2,
               thickness= T, linestyle= L,
               color= COLOR(HUE, .85*(T+nThicknesses*L)/nThicknesses/nStyles),
               caption= sprintf("Linestyle = %d, thickness = %d", L, T)
          ), T= 0..nThicknesses-1), L= 0..nStyles-1)
     ], insequence= true
);

Maple simply cannot evaluate this integral symbolically, even when n = 1. Would a numeric evaluation help you? Maple can easily do that.

Note that if you expect to be a real-valued function, then it needs to be surd(t-1, 3). But making this change does not make it possible to evaluate symbolically.

@Carl Love Here's a different way to do the same thing that I like better. This returns the actual list of vertices rather than just printing its members.

CutVertices:= proc(G::Graph)
description "Returns a list of the cut vertices of a graph.";
uses GT= GraphTheory;
local C:= nops(GT:-ConnectedComponents(G));
     select(
          (v-> C < nops(GT:-ConnectedComponents(GT:-DeleteVertex(G,v))),
          GT:-Vertices(G)
     )
end proc:

@Kitonum Matrix is superfluous. The code `<|>`(v $ n) already makes a Matrix.

@MiguelJesus Yes, I see your point. There may be some extraneous and invalid solutions given by Kitonum's code. I can work on it in a few hours. Someone else may get to it first.

@Mac Dude I would have the processes communicate via Sockets rather than via files.

@MiguelJesus I see nothing new in your more-detailed description of the problem that wasn't already obvious. And I see nothing inaccurate with Kitonum's solutions. Can you be more specific about what you think is wrong with Kitonum's solutions?

By the way, Maple does allow subscripted variables: X[1] or X__1. But let's not go there, because for me it's much more readable with single-character variables.

@Joe Riel The name is unintentionally inappropriate. I should've named it HasNegative.

@micahdavid That's not the same thing. Maple can do (numerically) the same integral that you passed to WolframAlpha:

int(1/Li(x), x= 2..2.1);

Li(x) for x > 1 is defined as the Cauchy Principal Value of Int(1/ln(t), t= 0..x). The integral starts at 0, not 2. Your inner integral starts at 2. Your integral is int(1/int(1/ln(x[1]), x[1]= 2..x[2]), x[2]= 2..2.1). It definitely diverges at its left endpoint. Since the divergence is at an endpoint, it cannot be saved by using Cauchy Principal Value.

@k20057 5 You can only use two equations, not three.

First 524 525 526 527 528 529 530 Last Page 526 of 709