Carl Love

Carl Love

28025 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk 

A randomize() is required if you want different random numbers after a restart. This is what happens if you don't use it:

restart: rand();
                          395718860534
restart: rand();
                          395718860534
restart: randomize(): rand();
                          953915355483

You wrote:

Also I don't see any repetition of randomize() in the code under consideration.

But I know that he is repeating it because that is the only way that he could be having the problem that he describes.

@jschulzb You wrote:

What does that mean? Is there something wrong with my code, or maple?

A lost kernel connection means that the mathematical "engine" or "kernel" or "server" of Maple has crashed but the GUI continues to run. This always indicates a serious bug in Maple and not a fault in the user's code.

@skullte

First read into the single Matrix M, then break out the columns. It's probably best to avoid using I and as variable names in Maple as they represent the imaginary unit and the differentiation operator respectively. So I'll use II and DD. (But if you really want to use I and D, there are ways to do that.) Then

InputT, II, DD, Ta:= M[.., 1], M[.., 2], M[.., 3], M[.., 4];

@skullte

First read into the single Matrix M, then break out the columns. It's probably best to avoid using I and as variable names in Maple as they represent the imaginary unit and the differentiation operator respectively. So I'll use II and DD. (But if you really want to use I and D, there are ways to do that.) Then

InputT, II, DD, Ta:= M[.., 1], M[.., 2], M[.., 3], M[.., 4];

If I run your code at Digits = 15 rather than your Digits = 3, I quickly get a lost kernel connection.

@phil76600 You wrote: I did'nt know ... that f was a special character.

f is not a special character. It's the prime symbol (') (also called an aposthrope or single quote) that is the special character.

@phil76600 You wrote: I did'nt know ... that f was a special character.

f is not a special character. It's the prime symbol (') (also called an aposthrope or single quote) that is the special character.

@goli 

Under that assumption, the expression can be simplified to (I did this part without Maple)

sqrt(1-f)/sqrt(t-t^f)

Then enter that to dsolve:

dsolve(D(y)(t)=sqrt(1-f)/sqrt(t-t^f)) assuming f > 0, 1 > f, t > 1;

It's significantly simpler than the last answer.

@goli 

Under that assumption, the expression can be simplified to (I did this part without Maple)

sqrt(1-f)/sqrt(t-t^f)

Then enter that to dsolve:

dsolve(D(y)(t)=sqrt(1-f)/sqrt(t-t^f)) assuming f > 0, 1 > f, t > 1;

It's significantly simpler than the last answer.

@samiyare 

So sorry. There was one character missing from the code. The constant in the ode should be _C, not C. I corrected the code in the Answer (and added some explanation). Please download again and try it again.

@samiyare 

So sorry. There was one character missing from the code. The constant in the ode should be _C, not C. I corrected the code in the Answer (and added some explanation). Please download again and try it again.

@Alex Smith Okay, I understand you. I do suppose that (1) the values at the two interior points are to be determined by the solution, that (2) any putative solution is differentiable on the interval 0..0.5 to the highest order required by the problem, and that (3) a numeric solution suffices. I suppose that you could say in the language of "posedness" that I suppose any discrete and reasonable thing required to make the problem well-posed.

@Alex Smith Okay, I understand you. I do suppose that (1) the values at the two interior points are to be determined by the solution, that (2) any putative solution is differentiable on the interval 0..0.5 to the highest order required by the problem, and that (3) a numeric solution suffices. I suppose that you could say in the language of "posedness" that I suppose any discrete and reasonable thing required to make the problem well-posed.

The fact that there's an integral does not pose any significant problem per se. The integral in this BVP does not depend on the independent variable, eta. In other words, given any putative solution to the BVP, we can compute the value of the integral. So, this problem is very similar to your other BVP from today, "solve an especial ode", with the integral playing the role of the 2*u(.25)+u(.16) from that BVP. So the same solution technique should work, in principle:

  1. Replace the integral with a variable
  2. Write a procedure whose input is a numeric value of that variable
  3. Have the procedure apply dsolve at that numeric value
  4. Compute the integral using that dsolve solution (by using `evalf/Int` with the integrand as a procedure)
  5. Return the difference between the integral and the input value
  6. Apply fsolve to the procedure.

But the dsolve is not converging for any value of the integral close to the (or a) solution, which I'm guessing is between -0.5 and 0. I've tried using a continuation parameter (see ?dsolve,numeric,BVP ) in about a dozen different places in the system, with no luck.

Perhaps someone who knows more than I do about continuation parameters can take a look at this. I emphasize that the integral is not the problem; the convergence issues arise with the integral replaced by a constant.

@phil76600

The reason that it is slow is that an fsolve command is used for every point plotted. In other words, in order to evaluate the implicit function numerically at a value of Vb, I solve equation eq numerically for pH. (Do you understand that?) From the gaps that you're getting, I guess that the fsolve may be having trouble converging for some points. What version of Maple are you using? I am not having that trouble in Maple 17. If it really matters, it may be possible to adjust some options and fill those gaps. Are you getting gaps in the plot of the primary also? I can't figure out a reason that you would only get gaps in the derivative. Both the primary and the derivative are applying fsolve to the same equation.

You can improve the speed by reducing the value of numpoints in the plots. The default value is about 200.

You asked:

`f'`:= (-D[2]/D[1])(F) @ (V__b-> (f(V__b),V__b)):

Why is 'f' necessary.

Are you asking why the quotes are necessary? If that's what you're asking: I wanted to name the derivative f ', that being one of the normal representations of a derivative and the one that you used. But f ' is not a valid name in Maple because it contains a special character. However, anything at all can be made into a valid name by enclosing it in back quotes (``). Does that answer your question?

You asked:

And what is that @ in this line ?

The @ is how one expresses functional composition. In other words, if h(x) = f(g(x)), then h = f@g. I did it this way to separate the symbolic computation (the left side) and the numeric computation (the right side). That way the symbolic differentiation is only done one time total, and the fsolve is only done one time for each point. Does that answer your question?

First 644 645 646 647 648 649 650 Last Page 646 of 708