Carl Love

Carl Love

18378 Reputation

24 Badges

7 years, 301 days
Mt Laurel, New Jersey, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Reshu Gupta @Rouben Rostamian  I don't fault Rouben for not having spotted this for two reasons: It's a very unexpectedly simple ODE, and I only discovered this by an exceptionally patient reading of your input. Of course, if one had expected this simple form, it would've been trivial to get Maple to confirm it.

@ogunmiloro This error is because in two places in the ODEs, you've used b[o] where you should've used b.

Several questions:

  1. The data C__f strongly suggest that C(0) = 1. So why do your ICs have C(0) = 400? Do the other ICs also need to be rescaled accordingly?
  2. Why don't you use the full data set C__f (153 values)?
  3. Using your initial parameter values, is an oscillatory function with a horizontal asymptote. That doesn't fit C__f at all. C__f looks like an exponential function.
  4. Should times start at 0 rather than 5?

Hints:

  1. As Tom Leslie pointed out, times[1] needs to be times[i].
  2. Add option maxfun= -1 to the dsolve command. This will eliminate most (perhaps all) of the "cannot evaluate" errors.

An exponential function fits C__f very well. This is shown by

Statistics:-ExponentialFit([$1..nops(C__f)], C__f, T, summarize);
Summary:
----------------
Model: 6.2601204*exp(.70239574e-1*T)
----------------
Coefficients:
              Estimate  Std. Error  t-value   P(>|t|)
Parameter 1    1.8342    0.1961      9.3532    0.0000
Parameter 2    0.0702    0.0022      31.7944   0.0000
----------------
R-squared: 0.9774, Adjusted R-squared: 0.9771

 

@mmcdara I've made progress on Windows 10 with your tasklist suggestion. The process identifier is returned by kernelopts(pid), so I get the one line for the current process (9040 in this example) like this:

StringTools:-Trim(
    ssystem(
        sprintf("tasklist /fi \"PID eq %d\" /v /nh", kernelopts(pid))
    )[2]
);
"mserver.exe 9040 Console 1 141,528 K Unknown DESKTOP-IL8TQTN\carlj 0:20:54 N/A"
[I hand-trimmed excessive internal whitespace from this output.]

The last field, shown as N/A, is the Window Title. I guess that's the value that we want filled in?


 

@Carl Love Actually, just doing a restart (and nothing else) in worksheet A may be enough.

@emendes The settings of infolvel[...trigger the execution of the userinfo statements in the code. The number of these statements to include is up to the command's author.

@emendes It only makes sense to me to change the outer seq to Grid:-Seq.

I don't see much hope for a useful solution. You're attempting a nonlinear fit of 15 parameters with only 20 data points. On top of that, the 20 dependent-variable values have only 4 distinct values.

@emendes 

  1. [f](...is equivalent to [f(...)] for any name (stock command or otherwise). Using the former helps to reduce long strings of closing brackets at the end of expressions, which is a purely stylistic concern.
  2. _ is a name, just like A.
  3. A^+ is the (matrix, array, vector) transpose of A.
  4. The first procedure is threadsafe, or either seq could be replaced by Threads:-Seq. The second procedure may not be threadsafe because of the transpose (which calls LinearAlgebra:-Transpose).
  5. As far as I know, there are no formal restrictions on code that can be run with Grid, provided that you have the memory---there is no concept "gridsafe". I don't understand why Threads is not working after Grid has finished; that is a bug. You could save data, then restart, read in the data, then use Threads.

Having such a large expression entered in 2D Input makes subsequent input excruciatingly slow to enter, even if that subsequent input is done in 1D.

@Tamour This is not a place to promote illegal uses of intellectual property (IP).

@itsme Yes, that's a good improvement.

Please attach the worksheet by using the green uparrow on the MaplePrimes editor toolbar.

@acer You're right, and I think that subs(n= nn, ...is the best solution (vote up). I just wanted to point out the existence of infix %assuming, which is new to Maple 2020 I believe.

However, the weirdness in this case arises because assuming treats Sum ​​​​​​differently than other unevaluated functions (which you're probably aware of, but the other correspondents are not), so it makes some sense to avoid using Sum in the first place. Compare with

restart:
e:= SUM((-1)^n-1, n= 1..infinity):
simplify(op(1,e)) assuming n::even;

                               
0

@Scot Gould I was not expecting my idea to work in the case of a new, unsaved worksheet.

@acer I meant this:

restart:
e:= %Sum((-1)^n-1, n= 1..infinity);
value(simplify(op(1, e) %assuming n::even));

 

1 2 3 4 5 6 7 Last Page 2 of 533