rlopez

2530 Reputation

12 Badges

15 years, 172 days

Dr. Robert J. Lopez, Emeritus Professor of Mathematics at the Rose-Hulman Institute of Technology in Terre Haute, Indiana, USA, is an award winning educator in mathematics and is the author of several books including Advanced Engineering Mathematics (Addison-Wesley 2001). For over two decades, Dr. Lopez has also been a visionary figure in the introduction of Maplesoft technology into undergraduate education. Dr. Lopez earned his Ph.D. in mathematics from Purdue University, his MS from the University of Missouri - Rolla, and his BA from Marist College. He has held academic appointments at Rose-Hulman (1985-2003), Memorial University of Newfoundland (1973-1985), and the University of Nebraska - Lincoln (1970-1973). His publication and research history includes manuscripts and papers in a variety of pure and applied mathematics topics. He has received numerous awards for outstanding scholarship and teaching.

MaplePrimes Activity


These are answers submitted by rlopez

The video you want to watch is

https://www.maplesoft.com/demo/streaming/ClickableCalculusSeries6-VectorCalculus.aspx

The part you want to see starts at about 22 minutes 30 seconds.

For functions of a single variable, the ideal notation for evaluating a derivative at x=c is f'(c). The parallel to this notation in several variables is the subscript notation, but a subscript cannot be an operator in Maple. Thus, f_sub_x(a,b) can only be made to work by the device illustrated in the Clickable Calculus video.

Let XXX stand for the mixed partial operator template in the Calculus palette.

In essence, the symbol f_sub_x is converted to an Atomic Variable, and then f_sub_x(x,y)=XXXf(x,y) is defined as a function, most easily done with the Context Panel's Assign Function option. When requesting that a partial derivative be calculated with this notation, again make f_sub_x an Atomic Variable and write f_sub_x(a,b)  and probably Control= to get inline evaluation and display.

I tried the OP's example with f_sub_xy (no spaces or commas) and it works correctly.

I have not been able to devise a better way in the more-than-ten years of searching that I've gone through for this notation.

plot(lhs(eq),x=0..100,-1..1) draws a graph where nearly vertical line segments cross the x-axis at the x-intercepts.

Using this information, apply the fsolve command.

fsolve(eq,x=20..30); get 22.37...

fsolve(eq,x=50..60); get 50.405...

etc.

with(Student:-MultivariateCalculus):

L1:=GetRepresentation(Line([1,0,-2],<1,1,2>,parameter=t),form=combined_vector);

L2:=GetRepresentation(Line([k*s+4,2*s,3*s],parameter=s),form=combined_vector);

solve(Equate(L1,L2));

This approach sets up and solves three equations in the three unknowns k, s, t.  Perhaps a bit more intuitive?

 

I think the error message indicates that you used y, not y(x) (or the equivalents) in your ODE. All instances of the dependent variable should occur with the independent variable included.

Typeset math allows the use of just the name of the dependent variable, but even there, one can get into difficulties cutting corners.

Consider the following commands.

interface(rtablesize=100): # so large matrices are fully displayed

q:=plots:-implicitplot(eqn,t=-50..50,y=-200..200): # hyperbola, so there are two branches
Q:=plottools:-getdata(q):

Q[1][3]  # data Maple used for first branch

Q[2][3]  # data Maple used for second branch

Alternatively, you could solve for y explicitly. There would be two branches, y1(t) and y2(t). Then, you could evaluate y1 and y2 at any values of t that you found convenient, and the corresponding values of y would be determined.

First, maple sees the symbol u as a name, not as a function. If u is to be a function of x, y, and z, then you need to enter it as u(x,y,z) to obtain the functional dependence you claim.

Then, the name on the left, u__0, which will look like a subscripted u, needs to be followed by an assignment operator, not merely an = sign. The = sign is used to form equations, Use := (colon equal) as the assignment operator.

Third, if you can apply diff to u__0, but display only an = sign in your post, but yet claim that Maple produced derivatives of some of the terms on the right, then you did more in your worksheet than you reported here. If, indeed, you did what you reported here, then applying diff to u__0 would result in zero because u__0 would not stand for the expression on the right of your = sign. It wouldn't be assigned anything.

In the future, it would be better to upload the whole worksheet via the green arrow in the toolbar at the top of the posting window. Then, we could see exactly what it is that you did, and not have to guess.

Not sure if you want to compute with the result or merely display it. I think you might have trouble trying to compute with it.

Maple's differentiation operators assume that the order of partial differentiation is immaterial, which is mathematically the case for funtions that are sufficiently differentiable. So, even if you could assemble the operator and apply it, Maple's treatment of differentiation might not respect the order you are trying to impose.

For example, (D[]1,2]*D[2,1])(f(x,y)) = D[1,2](f(x,y))^2

However, I'm not sure this is the last word on the matter. If someone else has a way to do this, I'd be pleased to know.

Maple uses the Variation of Parameters formula to obtain the particular solution. The integrals in this formula can, and do often, return terms that are in the fundamental set of solutions, that is, are homogeneous solutions. There is, as far as I know, no way to filter these out. This has plagued me since I started using Maple in my DE classes as early as 1989. If there is a way to filter these terms from the particular solution, I think we would both like to know.

The best I can suggest is a collect on the general solution, collecting with respect to sin(2*t) (here).

Does anyone have a better solution?

Google "Blum Blum Shub" and you will find that this is actually the name used for the algorithm attributed to its authors.

In Maple, execute the alias command alias(BBS=BlumBlumShub), after which you can replace the long name with BBS in the rest of the session. If you want that shortcut to load every time you launch Maple, put it into your .ini file.

If the equation is assigned to the name q, then

Student:-Calculus1:-Roots(q,K[1]=-1..1,numeric) returns three solutions: [-4.264348112*10^(-13), -2.539955697*10^(-13), .9832314847]

The solve command in Maple need not return all analytic solutions. The fsolve command, which computes numerically, can be made to find solutions in specified intervals. It would have found the positive solution you sought. The Roots command in the Student Calculus1 package will return all solutions in a specified interval, and can function either analytically or numerically. There are other root-finding tools in Maple, but the ones sketched here suffice for your question.

Look at the phaseportrait command in the DEtools package. In particular, look at the last example on the help page for this command.

There are many double integrals for which the inner integral can be evaluated (not "solved") in closed form. It might then not be possible to evaluate te outer integral of this result in closed form. If all parameters are numeric, it should then be possible to evaluate the outer integral numerically. It doesn't take much to be faced with this challenge - a square root of a sum of squares is usually what makes this happen for me.

The MultiInt command in the Student MultivariateCalculus package will do what you want.

This command has three outputs: output=value, output=integral, output=steps. The third option will evaluate the integral in a stepwise fashion.

The Roots command in the Student Calculus1 package is the ideal tool for this. If this package is installed, the Roots functionality will be available in the Context Menu. I have separated the equation from the Roots command for convenience.

q:=7*cos(2*t)=7*cos(t)^2-5;
Student:-Calculus1:-Roots(q,t=0..2*Pi);

[arccos((1/7)*sqrt(14)), Pi-arccos((1/7)*sqrt(14)), Pi+arccos((1/7)*sqrt(14)), 2*Pi-arccos((1/7)*sqrt(14))]

Here is a way of generating an asymptotic expansion by repeated integration by parts using Maple to do most of the work. It does not use the recipe provided by the OP, but the following structure is used in my Advanced Engineering Math ebook more than once.

with(IntegrationTools):
m0:=Int(exp(-x*t)/sqrt(t^2+t),t=1..infinity);
for k from 1 to 5 do
temp:=Parts(m||(k-1),remove(has,GetIntegrand(m||(k-1)),exp));
m||k:=eval(temp) assuming x>0;
print(m||k);
od:
 

The Parts command needs only an expression containing an unevaluated integral, and the factor that is to be differentiated in the integration-by-parts formula. The GetIntegrand command then extracts the integrand of the unevaluated integral that results. The remove command removes the exponential from that integrand, which leaves the next term that is to be fed to the Parts command as the factor that is to be differentiated. In order for the limits of integration to be evaluated, Maple needs to know that x is, for example, positive. So, the integration by parts is done first, then the limits are evaluated under the assumption that x>0. A simplify here brings everything into one fraction, not a useful step. The eval seems to force Maple to evaluate the limits under the assumption. Finally, m||k produces the names m1, m2, etc.

2 3 4 5 6 7 8 Last Page 4 of 23