Carl Love

Carl Love

28115 Reputation

25 Badges

13 years, 156 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk The original function omega_i appears (from the graph) to have a singularity at R_i_t = 1. If we avoid this point, then the minimax approximation is much better. I used minimax(omega_i, R_i_t= 0.25..0.95, 3).

@taro yamada The help page for `` is ?emptysymbol .

@Markiyan Hirnyk I was supposing that n would be defined at the time that the OP used the code. If n has a numeric value, then add and mul will not give an error.

@raveen Your book is right. The correctness of that answer is easily verified. But how it is different from the answer that you got with Maple?

@dipamilo What evidence do you have that it uses a numerical method? When given symbolic input doesn't it always give symbolic output?

@Kitonum Why use the curly braces? It could just be f[`6x`], etc. For the double index, I'd prefer f[`3x`,`4y`] over f[`3x,4y`].

@abbeykabir Closed form:

dsolve({diff(y(x),x)=x/y(x), y(0)=-2});

Euler:

sol:= dsolve({diff(y(x),x)=x/y(x), y(0)=-2}, numeric,
     method= classical[foreuler], stepsize= 0.1):
sol(1), sol(7/4), sol(2);

Runge-Kutta:

sol:= dsolve({diff(y(x),x)=x/y(x), y(0)=-2}, numeric,
     method= classical[rk4], stepsize= 0.1):
sol(1), sol(7/4), sol(2);



@yasemin In your original post, you use the command VigenereKeyFind(c). Is that the command that produces output "aaaaaaaaaaaaa"? The argument c should be a string. Perhaps you mean VigenereKeyFind("c"). Otherwise, you should have assigned a string to c.

@Julesp The tickmarks can be typeset in the way that you want like this:

plots:-densityplot(
     10^x*exp(-(10^x)^2-y^2), x= log10(.01)..log10(10), y= -2..2,
     axis[1]= [tickmarks= [seq(k = 10^nprintf("%d", k), k= -2..1)]],
     colorstyle= HUE, axes= boxed, style= patchnogrid, grid= [100,100]
);

I also changed colorstyle from RGB to HUE. This gives much better differentiation.

 

@Markiyan Hirnyk Sure. Let's take the example that you used:

plots:-densityplot(x*exp(-x^2-y^2), x= 0.01..10, y= -2..2);

which I've modified slightly so that 0 is not the lower bound of x. We change the command to

plots:-densityplot(
     10^x*exp(-(10^x)^2-y^2), x= log10(.01)..log10(10), y= -2..2,
     axis[1]= [tickmarks= map(x-> log10(x)=x, [.01,.1,1,10])],
     colorstyle= RGB, axes= boxed
);

@Markiyan Hirnyk Changing the tickmarks is not trivial. In the package that I mentioned above, I devoted 250 lines of the code (and comments) just to changing the tickmarks. Of course, that was for the most general case. It easier when you know the range that you are working with.

The easiest thing to do is to decide "manually" which tickmarks you want. Let's say you have a list X of desired tickmarks. Then use option

axis[1]= [tickmarks= map(x-> log10(x)=x, X)]

@Markiyan Hirnyk It may be manual work, but scaling the input and the input range and customizing the tickmarks is the only way that works. Changing the axes option to mode= log will not change the way that the evaluation points are selected, like the OP says.

I wrote a package to automate this way back in 2001, but, unfortunately it no longer works due to changes in PLOT structures and the plottools:-transform command. It is in the Maple Applications Center as "Improved logarithmic plotting in 2 and 3 dimensions". Even though it no longer works, the code and comments could be perused for ideas.

Note that "Length of output exceeds...." is not an error message. Your answer is still put in the variable sol.

Enter the code with 1D input instead of the (default) 2D input. The variable name `&rsquo` looks like the type generated by 2D input.

The error message is from dsolve, not from LSSolve. You can get around this first error by specifying method= bvp[midrich] in the dsolve. Then you will get an error "initial Newton iteration is niot converging". The usual remedy for this is to specify a continuation parameter. I haven't figured out a good place to place the parameter. See ?dsolve,numeric_bvp,advanced.

First 576 577 578 579 580 581 582 Last Page 578 of 710