Carl Love

Carl Love

28110 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@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.

@ctnaz You need to download and install DirectSearch from the Maple Applications Center.

@I_Love_LSK It looks like you're using a list of three Vectors. I'm surprised that you don't get an error message. Make the argument to spacecurve a list:

plots:-spacecurve(
     [cos(Pi/3)*sin(t)-sin(Pi/3)*cos(t), sin(Pi/3)*sin(t)+cos(Pi/3)*cos(t), t],
     t = 0 .. 6*Pi
);

And change 60 to Pi/3.

@adel-00 Keep it at infinity. That's just an initializer for keeping track of the minimum. It is changed from infinity as soon as the first value is processed.

@adel-00 Change the Val procedure from Val:= x-> abs(x[2]) to Val:= x-> abs(x[2] - 1e-4);

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