Carl Love

Carl Love

28155 Reputation

25 Badges

14 years, 8 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Also a nice trick. This shows that any distinct region can be selected if you can "trace" the border as one continuous path.

Also a nice trick. This shows that any distinct region can be selected if you can "trace" the border as one continuous path.

Try 7/2. I get a Beta function in Maple 17.

Does this line have a typo?

X := : Y := Matrix(2): Z := Matrix(2):

Or is there some new syntax that I'm not aware of?

Does this line have a typo?

X := : Y := Matrix(2): Z := Matrix(2):

Or is there some new syntax that I'm not aware of?

Nice trick with the color= white. A variation is to add the option transparency= 0 to the second plot.

Nice trick with the color= white. A variation is to add the option transparency= 0 to the second plot.

@JamesK 

I know:P.....I've also tried Tree := Tree, {whattype(expr)},{whattype(elem)}; but I get the same error...what can I do?

A set cannot have two copies of the same element. But you can make a copy of a symbol which looks the same but is essentially different. You do this with convert(..., `local`). Example

{A,A};
                              {A}
b:= convert(A, `local`);
                               A
{A,b};
                             {A, A}

You can make any number of copies this way. A string cannot be copied like this. This is why I labeled the vertices with symbols instead of strings in my FunctionToTree.

@JamesK 

I know:P.....I've also tried Tree := Tree, {whattype(expr)},{whattype(elem)}; but I get the same error...what can I do?

A set cannot have two copies of the same element. But you can make a copy of a symbol which looks the same but is essentially different. You do this with convert(..., `local`). Example

{A,A};
                              {A}
b:= convert(A, `local`);
                               A
{A,b};
                             {A, A}

You can make any number of copies this way. A string cannot be copied like this. This is why I labeled the vertices with symbols instead of strings in my FunctionToTree.

@JamesK I see....What do you recommend I should do?

To answer that simplistically: Anything can be converted to a string with convert(..., string) or sprintf("%a", ...); anything can be converted to a symbol with convert(..., symbol) or nprintf("%a", ...).

But since I know where you're going with this, I suggest that you study closely my FunctionToTree module in the other recent thread here. You're going to encounter exactly the same problems that I did when writing that, even though you're not first applying ToInert.

@JamesK I see....What do you recommend I should do?

To answer that simplistically: Anything can be converted to a string with convert(..., string) or sprintf("%a", ...); anything can be converted to a symbol with convert(..., symbol) or nprintf("%a", ...).

But since I know where you're going with this, I suggest that you study closely my FunctionToTree module in the other recent thread here. You're going to encounter exactly the same problems that I did when writing that, even though you're not first applying ToInert.

@JamesK 

I replaced Tree := Tree, {whattype(elem),elem} with Tree := Tree, {whattype(elem)} and I get the following output and error :

Error, (in GraphTheory:-Graph) invalid edge/arc: {2}

Well, of course. Every edge needs two vertices.

@JamesK 

I replaced Tree := Tree, {whattype(elem),elem} with Tree := Tree, {whattype(elem)} and I get the following output and error :

Error, (in GraphTheory:-Graph) invalid edge/arc: {2}

Well, of course. Every edge needs two vertices.

@STHence 

Is there any way that Maple only solves first 9 equations and then substitutes the resluts to the last equation at each instant? 

Like I said, I already did solve it for only the first 9 equations. Doing so, each "instant" would take on the order of 53 minutes of CPU time. So if the integration uses, say, 200 evaluation points, then that could take a week or more. (Although there may be a "learning" effect where subsequent evaluation points take less time.)

Update: In addition, without last ODE, by using "eliminate" function in order to remove lambda 1 and lambda 2 from the equations, Maple can solve first 9 ODEs without any errors or warning.

Like I said, the dsolve itself ran fine in 22 seconds. It is using the results of the dsolve that takes a lot of time.

There's a chance that increasing the error tolerances and settings Digits to, say, 4 will make it run significantly faster. I don't have much hope for this approach though. It might be possible to simplify the equations after the eliminate and before the dsolve. And it might be possible to apply a code optimizer like codegen[optimize] to the procedure that dsolve returns.

@STHence 

Is there any way that Maple only solves first 9 equations and then substitutes the resluts to the last equation at each instant? 

Like I said, I already did solve it for only the first 9 equations. Doing so, each "instant" would take on the order of 53 minutes of CPU time. So if the integration uses, say, 200 evaluation points, then that could take a week or more. (Although there may be a "learning" effect where subsequent evaluation points take less time.)

Update: In addition, without last ODE, by using "eliminate" function in order to remove lambda 1 and lambda 2 from the equations, Maple can solve first 9 ODEs without any errors or warning.

Like I said, the dsolve itself ran fine in 22 seconds. It is using the results of the dsolve that takes a lot of time.

There's a chance that increasing the error tolerances and settings Digits to, say, 4 will make it run significantly faster. I don't have much hope for this approach though. It might be possible to simplify the equations after the eliminate and before the dsolve. And it might be possible to apply a code optimizer like codegen[optimize] to the procedure that dsolve returns.

First 680 681 682 683 684 685 686 Last Page 682 of 711