Art Kalb

197 Reputation

11 Badges

15 years, 147 days

MaplePrimes Activity


These are replies submitted by Art Kalb

@rlopez Thanks for the reply. The order the operations are imposed does not matter. Partials commute.

 

 

@Christian Wolinski 

 

Thanks for the reply. I don't think I am quite getting it.

Do you have an example of the difference?

 

Thanks.

@Christian Wolinski 

Thanks for the reply.

I experimented around and found that the uneval quotes make a difference - so I can get the expected behavior if I quote 'Heaviside'.

I'm not sure why Heaviside requires the quotes where other procedures do not?

As a side question, what is the distinction between patmatch and typematch?

 

Regards.

 

@tomleslie 
 
Thanks for the reply.

I definitely intend it to only match for type algebraic.

type(x,algebraic) returns true

I get a valid pattern match for an arbitrary function "f"

example.mw

 

My expectation is that if x is not algebraic that I would get a false match.

 

 

 

 

@Carl Love Thanks for the reply. I had seen the wrightomega function, but I'm not sure how this helps me. Maple will not solve for the wrightomega function, so I am stuck trying to get my answer onto the correct branch.

 

@Carl Love . Thanks Carl. The result looks good.

I did some further clean-up, borrowing from your basic idea. I eliminated the multiple patterns for alpha. Slightly different. I think equivalent?

Regards.

alias(alpha = RootOf(x^4+x+1))

alpha

(1)

z := alpha^3*a[3]+alpha^2*a[2]+alpha*a[1]+a[0]

a[3]*alpha^3+a[2]*alpha^2+a[1]*alpha+a[0]

(2)

mod2simp := proc (x) options operator, arrow; `mod`(thaw(subsindets[2](subsindets(x, {identical(alpha)}, freeze), Not(identical(freeze(alpha)))^integer, 1, op)), 2) end proc;

proc (x) options operator, arrow; `mod`(thaw(subsindets[2](subsindets(x, {identical(alpha)}, freeze), Not(identical(freeze(alpha)))^integer, 1, op)), 2) end proc

(3)

z2 := collect(`mod`(Expand(z^2), 2), alpha):

z3 := collect(`mod`(Expand(z^3), 2), alpha):

``

mod2simp(z2)

a[3]*alpha^3+(a[1]+a[3])*alpha^2+a[2]*alpha+a[0]+a[2]

(4)

mod2simp(z3)

(a[1]*a[3]+a[2]*a[3]+a[1]+a[2]+a[3])*alpha^3+(a[0]*a[1]+a[0]*a[2]+a[0]*a[3]+a[1]*a[2]+a[1]*a[3]+a[2]*a[3]+a[2])*alpha^2+(a[0]*a[1]+a[0]*a[2]+a[2]*a[3]+a[3])*alpha+a[0]+a[0]*a[2]+a[1]*a[2]+a[1]*a[3]

(5)

``


Download Polynomial_Mod_2.mw

@Carl Love : Thanks for the response. I thought you had it, but realized the alpha's are also being reduced.

 

@Carl Love : Thanks. It does the trick. Took me a couple minutes to decipher what it was doing - interesting.

 

I'll leave the thread open a bit to see if someone comes up with something slicker.

 

Thanks again.

The following does work:

`erf/InverseErf`(y)

               y

 

 

The following does work:

`erf/InverseErf`(y)

               y

 

 

@Art Kalb There were no semicolons after the function calls.

@Art Kalb There were no semicolons after the function calls.

@Carl Love I expect it to just return the argument to the inner call.

Here is what I am getting:

evalf(InverseErf(y));
                               y
erf(InverseErf(y));
                       erf(InverseErf(y))
InverseErf(erf(y));
                       InverseErf(erf(y))


Note that evalf returns y, the other two functions do not. I would expect all of them to return y.

 

I was basing my code on the page "evalf,details"

@Carl Love I expect it to just return the argument to the inner call.

Here is what I am getting:

evalf(InverseErf(y));
                               y
erf(InverseErf(y));
                       erf(InverseErf(y))
InverseErf(erf(y));
                       InverseErf(erf(y))


Note that evalf returns y, the other two functions do not. I would expect all of them to return y.

 

I was basing my code on the page "evalf,details"

Thanks for the input. I am trying to write a generic procedure so it would be hard to provide an initial guess. I would also like to maintain the domain checking.

I agree fsolve may not be the best solution. I'm pretty sure it was you that wrote an article somewhere on Mapleprimes about erf? Have you implemented anything that chooses the appropriate approximation for each region? I did some research and there does appear to be some decent approximations (accurate out to 10e-19 or so).

I wasn't sure what the "use any fct instead" meant? Could you please clarify?

 

 

1 2 3 4 5 6 Page 2 of 6