Carl Love

Carl Love

28035 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@J4James To evaluate P1 numerically, you need a numeric value of y. For example, eval(diff(J(y), y), F2[Q](h2)).

 

@BrettKnoss A Maple series structure (which includes Taylor series) is only generated to a finite number of terms, without the general term. So there's no way to do convergence tests with those.

But for the few Taylor series that you can get via FormalPowerSeries, you can do exactly as shown above.

@Wilks Your problem is a (very simple) differential equation with initial conditions, i.e., an initial-value problem or IVP. There's no need to explicitly use any integration command or make any explicit reference to any constants of integration. The command dsolve handles all that:

restart:
dsolve(
    {diff(Y1(x), x$2) = (Ay*x-p__2*x^2/2)/E/Iz1, Y1(0)=0, D(Y1)(0)=0}
);
Y1:= unapply(rhs(%), x);

Now you can do Y1(a) for any value of a, whether numeric of symbolic.

@ You wrote:

  • Though not stated, I tried substituting dy for dx.

Yes, most definitely "not stated". I suggested changing x to y in dx, not changing dx to dy. Apparently, it will allow you to change the "d". I think that that should be considered a bug; it shouldn't be allowed.

I have no trouble computing a double integral of a product of functions. In the link below, I compute

f(x,y):= x*sin(y);
g(x,y):= y*cos(x);
int(int(f(x,y)*g(x,y), x= 0..y), y= 0..Pi/4);

following the simple steps I originally described.

https://learn.maplesoft.com/index.html#/?d=EJKMAUGQFPAUOKGKDKKGAUBNBILLFNLFCPBFLONTOQLIFFLULUFMDUDTGKCMIUDMMGGTEUBHNKHJAPCPGSJPHMPMHIMLEKLIJRMR

 

@Wilks The code that I posted above will work for any certain x, numeric or symbolic, so I'm not sure what you mean by "still experiencing problems". Are you simply asking why your original formulation didn't work and why it gave the error message that it did?  Okay, here's your original Y1:

Y1 := x-> int(`Y1"`(x), x)+C1

Thus, Y1(0), before it's fully evaluated, is int(`Y"`(0), 0)+C1. Does that make any sense to you, to perform an integration using 0 as the variable of integration? In other words, you're trying to use the bound variable x (a variable that cannot be arbitrarily replaced by a value) as if it were a free variable (a variable that can be replaced by a value). There are several solutions to this order-of-evaluation problem. The way that chose was to use intat instead of int because intat is specifically intended for this situation. The other solutions are much-more-general techniques for addressing order-of-evaluation problems, and Maple has many of them. One of them is unapply, as shown by Kitonum. If for some reason my intat solution is inadequate for you, I'll post one of these other techniques.

@Kitonum Maple Learn is a web-browser-based calculator. Go to learn.maplesoft.com/#/ or simply follow the link in my Answer above.

@acer Yes. I based my Answer on the OP's exposition alone; I didn't read or execute their code.

Regarding "persistent store": This slightly awkward and confusing phrase simply refers to the existence of Maple's "library" or "archive" system. The warning should probably be reworded to "Warning: readlib is deprecated; Maple archives make it obsolete", or, with a bit of humor, "Warning: readlib has been deprecated; Maple's brand-new archive system makes it obsolete, although harmless".

What do you want to do with that text file? Do you want to be able to read it a in text editor? Or do you simply want to save it to reload into another Maple session? Or do you want to load it in some other math software?

And, no, you're not allowed to trap assertlevel errors with try/catch or any other method. Any Maple library code that violates assertlevel=2 should be reported as a bug. Either the programmer put in the assertions to catch bugs, or their supervisor made them put it in for the same reason. There's no other purpose for the ::type assertions that are used with local declarations, which is exactly the ones caught by assertlevel=2.

@tomleslie Unfortunately, CodeTools:-Usage(..., iterations= ...doesn't control for caching (aka memoization).

@acer The dimension of the result should be A^2*s (or, more formally stated, current^2*time). The dimension of an integral is always the dimension of the integrand times the dimension of the bound variable. 

By the way, the command randomize that appears in your worksheet does nothing. The correct command is.randomize().

I tracked down the error that occurred with 30 Digits. One of the integrations in the 12th iteration of the loop returned unevaluated because there were not a sufficient number of "guard digits" to achieve the requested accuracy (of 30 digits). The problem can be corrected by including the epsilon option in the Int command. I used epsilon= 1e-9 and it "worked" in the sense of producing a result. I do not know whether that result meets your accuracy needs. In practice, the value of epsilon used should be based on Digits rather than constant, something like epsilon= 10.^(3-Digits).

I can't address your issue with $include. However, you can't in general substitute read for $include, and the error that you get using read is totally expected. You see, read is a command of the Maple language, so the presence of read before a subsequent export is putting an executable command in the declarations section of the module, which isn't allowed. On the other hand, $include is not a command of the Maple language, so it should work. But, as I said, I can't address that further.

First 148 149 150 151 152 153 154 Last Page 150 of 708