Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk Please clarify your statement about the general solution. And what do you mean by "exception"? It seems that the general solution cannot be produced by dsolve.

@BobWild Do you mean that you want to solve part b, i.e., get the analytical solution? That is just the same answer that I gave before with different specific values.

Or do you mean that you want to solve part c, i.e., get the matrix/vector solution using a stepsize of h=Pi/8? That's more complicated. To help you with that, I would need to see the page that precedes equation 11.18 in your book. Specifically, I need to see how I the mesh points are defined. I don't know if they are using a midpoint or endpoint method. You will need to set up the matrix and vector for that, because the mesh options to dsolve(..., numeric) will not let you make a mesh that small.

@BobWild Correct: You do not need to define the mesh points. That is done automatically. Often it helps to adjust the number of mesh points. This is done with the options initmesh and maxmesh. See ?dsolve,bvp for precise details, or post a specific BVP problem here. But it is best to not add any options unless you initially get an error message without them. An error message usually gives a suggestion for which option to adjust and which direction to adjust it.

There is no need to create a matrix and no option for it either. That is all handled internally. You can pass in a vector for an approximate solution. And you can receive the output in matrix/vector form, but the procedure form of output is usually more convenient, with interpolations handled automatically.

Please read the help page ?dsolve,bvp .

@BobWild That is correct; only the boundary conditions are needed.

@Ratch I see what you mean. The first two terms should be 1+x instead of x+1, and when the slider is set to 49 or 50, the last two terms are inverted also.

I can't find the underlying startup code. How do I get to it?

Could you please provide more details of your situation? some example values perhaps? or a worksheet?

@Carl Love I just significantly updated this Answer to use plots:-loglogplot rather than a simple point plot with logarithmic axes. So, it is more in line with your question.

@highsciguy After applying the first evalindets, hit it with

evalindets(%, identical(1.), 1);

Please, let me know how that goes!

@Joe Riel For me, your post that compares all the Cartesian product procedures is the top hit when I enter "Cartesian product" (without quotes) into the MaplePrimes search bar. It is dated April 27, 2010, which may be why you're having trouble finding it. There are hundreds (maybe thousands) of posts and questions with that date, so I guess that a lot of old posts had their date changed to that in some "update".

@Markiyan Hirnyk Is that entrance exam for all students entering the University, or just for those majoring in math?

@SandorSzabo Your file did not attach. This is an intermittent bug in MaplePrimes. Please try again, or post your code as plain text.

@viraghj Sorry, there was one character missing from the worksheet. Thank you for finding and reporting the problem. I've now corrected it in the original Answer. Please try again.

@Carl Love I've made an improvement to the operator &=. Now it can take anything (functions, indexed expressions) on its left side that := can take, and it will be treated the same as := treats it (it doesn't matter if it's already assigned---it will reassign it).

`&=`:= proc(f::uneval, expr::uneval)
local x:= eval(expr);
     print(op(1, subs(_f= nprintf("%a", f), _x= x, proc(_f:= expr=_x) end proc)));
     assign(f, x)
end proc:

@jimb1993 

If you say

Sol:= zip(B, X, Y);

then there are several ways to see the elements of Sol. One way:

interface(rtablesize= 50):  Sol;

The same is true of any Array with a dimension greater than 10.

The second way is to address the elements of Sol individually by indexing: Sol[1], Sol[2], Sol[3], etc.

The third way is to convert it to a list:

convert(Sol, list);

You say that you needed to convert the x and y in B to uppercase. Sorry to say it, but that cannot be true.

Copying from Excel should be no problem.

If your x and y values are in a single matrix A with the x values in the first column and the y values in the second, then you can do this:

Sol:= zip(B, A[..,1], A[..,2]);

@jamesc You just need to change the initial point from 0 to 1. It's positive 1 because I've taken the mirror-image of the function and am looking at the roots on the positive axis, because NextZero only works in the positive direction.

N:= 100:  #Number of roots desired.
Root:= Array(1..N):
#NextZero only works in the positive (forward or rightward) direction.
#We want roots in the negative direction. We need to translate the negative
#roots to the positive axis by using f(-p) and then negating the found root.
Root[1]:= -RootFinding:-NextZero(p-> f(-p), 1):
for n to N-1 do
     Root[n+1]:= -RootFinding:-NextZero(p-> f(-p), -Root[n])
end do;

By the way, that critical point is at exactly p = -0.75.

 

First 563 564 565 566 567 568 569 Last Page 565 of 709