Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@MDD

If Acer's way isn't generalizable for your purpose, then you need to show an example where it won't work for your purpose and what the desired coefficient matrix for that example is. 

Note that any command that works for an individual polynomial can be mapped over a Matrix of polynomials.

@reinhardsiegfried 

I got one t^3 term and O(t^4). But I don't know how you corrected the two syntax errors in your p1. You may have corrected differently than me. In your latest example, the expanded polynomial does not have any terms of degree 3 or less in t. That's why it shows just O(t^4). If you want to include terms of degree 4 in t, use 

series(expand(p1), t, 5);

@hopereza 

The problem is not with map. As you yourself show in the worksheet, the same error ensues when you try to apply int to an individual array element. What you have found is a bug in the symbolic integration of some functions of the form exp(a*x)*R(x) where R(x) is a rational function. You can get around this by forcing numeric rather than symbolic integration. You do this by replacing

map(int, ...);

with

map(evalf @ IntegrationTools:-Expand @ Int, ...);

Note the capital I in Int. Since you have so many floating-point coefficients, you may improve accuracy if you replace the other, currently working, integration likewise. The error control in Maple's numeric integration is very good.

I see that you tried to use evalm in your code. This command has no use in modern Maple. It is only present so that legacy code continues to work. Please don't ever use it.

 

@hopereza Please post a worksheet where it doesn't work. 

@digerdiga 

plot(Product(1 - q^(5*k+1), k= 0..infinity), q= -1..1);

@Markiyan Hirnyk It seems that `#mn(01)` prettyprints the same as `#mn("01")`, but it is easier to type.

@itsme 

It's a good solution, but it should be noted that

1. The double underscore produces a result that prettyprints the same as an indexed name but which acts programmatically like a symbol, an unindexed name.

2. mu__01 prettyprints the same as mu[`01`], with the 01 in italics. mu[`#mn(01)`] prints with the 01 normal, upright.

@hopereza 

Hmm, the tilde is not working in your worksheet. I don't understand why yet. But I tried this in your worksheet, and it definitely works:

map(int, Phi^%T*f, x= 0..1);

@Markiyan Hirnyk I converted your Reply to an Answer and gave it a vote up. I think that your solution is better than mine.

@Rouben Rostamian  ScalarMultiply multiplies a Matrix or Vector (its first argument) by a scalar (its second argument) according to ?ScalarMultiply.

@itsme In Maple 18, I find no command named Grid:-Set. There is a Grid:-Setup, but this does not seem to have anything to do with copying memory.

@smith_alpha 

C:= ImportMatrix(
     "C:/Users/Carl/Desktop/Matrix.txt",
     skiplines= 1, source= delimited, delimiter= " ", transpose
);

@mthkvv Threads has no problem with trivial operations. In the case of Grid, the entire memory space must be copied to each process, plus a new kernel has to be created.

@smith_alpha 

Read the first line with 

Z:= fscanf(filename, "%d")[];

Technically, the whole file can be read with fscanf because there are scan codes for matrices. But it'll be easier to use ImportMatrix, which just constructs the correct fscanf command for you.

@ 

You wrote:

If Maple solves with rkf45dae it probaly means that is solves dy/dt =f with algebraic equations may be as a constraint.

That is not the understanding that I get from the help page ?dsolve,numeric,DAE_extension. In particular, it explicitly says that the systems can be partially implicit.

Patient, convert all of your equations to dy/dt =f .

That doesn't appear to be possible for this system.

If needed differentiate the algebraic equations,

Patient's system doesn't have any algebraic equations. Nonetheless, it seems to require a DAE solver because of its implicit nature. It is possible that another of Maple's IVP solvers can handle it. I haven't tried yet.

If some one posts *.mws worksheet that works, I will try. ( or at least in that format, 1D math)

The worksheets posted so far in this thread have been in 1D form.

First 486 487 488 489 490 491 492 Last Page 488 of 709