Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

There is a constant Pr in the second equation. I assumed that this was a typo for Pi. Using that and attempting to solve the system, I get the dreaded error "Newton iteration is not converging".

@Murilo V The multiplication operator was likely caused by typing an extra space between evalf and its opening parenthesis. This only affects 2D input.

@kamrul126 Does the file exist already? If it does, then that is the problem. Do you have write permission for the directory/folder specified by currentdir()? If you are not sure, try using a fully qualified file name such as "C:/Users/Carl/Desktop/file1.mpl"

@DJJerome1976 asked:

If I change the problem to 2*sin(2*x+Pi/4), and the desired form is sqrt(2)*sin(2*x)+sqrt(2)*cos(2*x), expand(,trig) no longer works for me. How might this one be tackled? Clearly, one may just replace "x" with "2x," but is this the only way?

combine(expand(%));

@Markiyan Hirnyk My comment was directed to the OP.

@Markiyan Hirnyk Isn't that close enough to the desired output to count? Is the problem that you want the sqrt(2) in the front?

This output can be obtained with a simple expand; the trig modifier is unnecessary.

Perhaps you're missing a semicolon on the first line.

@Markiyan Hirnyk Hence the use of a midpoint method, either bvp[midrich] or bvp[middefer].

After correcting for "initial Newton iteration is not converging" by using a continuation parameter (I used A[1]:=1/Ccontinuation= C), I am left with the much more difficult-to-fix error "Newton iteration is not converging". See ?dsolve,numeric_bvp,advanced .

@Ratch You use option implicit when you do not want the answer to be in a form solved for y(x).

@Axel Vogt What he wants is

seq(fsolve(eval(NN, [x,N]=~ L[k])), k= 1..nops(L));

But all of the fsolves return unevaluated. I guess it's because either the accuracy cannot be achieved, or there is truly no solution. Further explorations with RootFinding:-NextZero and plot (see my other Answer) show that both situations ensue.

@J4James I misinterpretted your question. I thought that you wanted the one value of d that is the best fit for all the data. If you want a separate for each (x, N) pair, you can use fsolve without NonlinearFit.

@sakhan Converting the result back into hex is required. It is a nescessary step to getting back to plaintext. You cannot take an arbitrary integer and apply convert([...], bytes) to it. The integers in the list need to be in the range 0-255. Here's a little procedure to convert hex to plaintext:

HexToPlaintext:= H-> convert(sscanf(H, cat("%2x" $ length(H))), bytes);

However, if I apply this to your hex strings, I just get garbage characters rather than English text. So I wonder how you got your number1 thru number11.

What is the result when you call rtable_eval(A) ?

@John Fredsted It is just a coincidence that the final result is also equal B . < 3, 0, 1 >. If you change any entry in A, this is no longer true.

For shorthand, note that Vector([a,b,c]) is equivalent to < a, b, c >, and that Transpose(A) is equivalent to A^%T.

@Joe Riel How is it possible that the whole procedure takes only 48 seconds when simply the call to Iterator takes over 200 seconds for me? I am using a compiled iterator. That is, the line

AllP:= [seq(P, P= Iterator:-SetPartitions({S[]}, [[4,4]]))]:

takes over 200 seconds for me. Could there be that much difference between our compilers?

First 571 572 573 574 575 576 577 Last Page 573 of 709