rlopez

3020 Reputation

14 Badges

20 years, 236 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

Faced with the same question, I'd draw a graph to get some visual clues as to the behavior of the expression to the right y=...

After looking at the graph, I decided I'd check the limits as x -> infinity and -infinity. Once I had done that, I'd then match the observed behavior to the expression itself, analytically. For instance, the domain appears to be disjoint, and I'd examine the expression to understand exactly why this occurs.

RJL

There are two modes of data entry in a Maple document. You can type in text mode or math mode. To toggle between the two modes, use function key F5, or the Text/Math buttons at the upper left of the toolbar.

In Text mode, everything typed is in the default font, which is non-italic. In Math mode, everything typed is in 2D math. So, it the issue is that you are typing text, set the mode to text and the cursor will be upright with no dotted rectangle around it. If you switch to Math mode, then the cursor will tilt and be surrounded with the dotted rectangle, and what's typed will be interpreted as mathematical notation.

Maple represents the real n-th root of x as surd(x,n), where n is a positive integer.

Graph surd(x,3) from 1- to 1 to see the "whole" curve.

Similarly, surd(8,3) immediately returns 2.

Finally, note that convert(x^(1/3),surd) returns surd(x,3) which is displayed with a radical sign, but is internally represented by the surd construction.

Try the following:

plots:-implicitplot([f(x,y,c),g(x,y,c),c],x=a..b,y=C..d);

where a,b,C,d are apropriate numbers. This command draws the curve y(x) parametrically. Might just work. (Your intimation that f and g are degree-16 polynomials is scary. I don't know how well Maple will do with such expressions.)

The implicitplot command takes options that help smooth out the curve. One I frequently use is gridrefine=n, where n is a positive integer.

The worksheet at the end of the link

http://www.maplesoft.com/applications/view.aspx?SID=149514

details the Dragilev method for obtaining a numeric solution to a system such as yours. The worksheet is a Tips & Techniques article that appeared in the July Maple Reporter, and is stored in the Maple Application Center.

The original post about this method was made by Markian Hirnyk, but the App Center article contains hyperlinks to all the original posts concerning the Dragilev method.

There are commands in the DEtools package for manipulating linear differential operators. For example, define the operator via

L:=(Dx-p)^2;

Then obtain the result I believe you are looking for via

DEtools[diffop2de](L,f(x),[Dx,x]);

The output of this command is p^2*f(x) - 2*p*f'(x)) + f"(x), where f' and f'' are actually given in terms of d/dx, etc.

 

Perhaps this will do?

From the sample of the answer given, it looks like the system is underdetermined. Therefore, look at the LinearSolve command in the LinearAlgebra package. This command takes the system either as a list of equations or in matrix form. If the system is underdetermined, free variables are returned as _t0, _t1, etc. However, this command has the flexibility to choose the base name for the free variables, so if the option free=s were to be used, the free variables would be s[1], etc., set as subscripted notation.

RJL Maplesoft

in the dsolve command assigned to A1, add the option output=listprocedure. Now, A1 will return a list of procedures. The first procedure is the independent variable, the remaining ones are the dependent variables and their derivatives.

Let's say the ODE is y''=y, and a BVP is set up and solved numerically this way. Then the list of procedures in A1 can be exploited as follows.

Y:=rhs(A1[2])

The second procedure in the list A1 is the one that gives numeric values for y. It is in the form y(x)=... so that's why the rhs command is used (right-hand side). The function Y will now compute values of y(x) numerically.

Now, go and do likewise. Feel free to contact me off line if you have additional questions.

RJL Maplesoft

The Taylor Approximation tutor (Tools menu, then Tutors, Calculus-Single Variable, Taylor Approximations) will return both a graph and the Taylor polynomial of given degree. With this tool, the first and second degree approximations can be determined, and a graph drawn and returned.

In the Student:-Calculus1 package (Tools menu, Load Package, Student Calculus 1) the TaylorApproximation command will also return the requisite Taylor polynomials. In fact, the option order=1..2 will return a sequence of the approximating polynomials of degrees 1 and 2.

The hyperlinks provided lead to two files that define and use a function for drawing secant lines. Here is a solution based on Maple primitives.

In part (a), obtain the slopes of the eight secant lines with a calculator, as required. However, these slopes are more easily obtained in Maple:

Student:-Precalculus:-Line([.5,0],[1,cos(Pi*1)])

returns a sequence of 4 items: the equation of the line connecting the two points, the slope of the line, and the x- and y-intercepts. Of course, a sequence of the points can be defined, and a loop used to iterate this calculation, but it would be just as fast to copy and paste the command, editing each instance as needed.

The slope of the tangent line is -Pi.

Student:-Calculus1:-Tangent(cos(Pi*x),1/2);

This will return the equation of the tangent line.

Student:-Calculus1:-Tangent(cos(Pi*x),1/2,output=plot);

This will return a graph of the curve and the tangent line.

To add the graphs of two secant lines, copy and paste onto this graph the expressions for the secant lines obtained earlier with the Line command. These equations are in the form y=..., so copy and paste just the right-hand sides. Don't copy the y=.

Generally, decimal numbers in Maple are "contagious" so that use of one such number in an expression causes the whole expression to become a floating-point number. However, there are exceptions, and Pi is one of them. To force an expression to decimals, use the evalf command, or use the Approximate option in the Context Menu.

In a document, using 2D math, write exactly what appeared:

f(x)=((x^2-x-3)/(x^2+1))*(x^2+x+1)

Context Menu: Assign Function

Then write f'(x), where the prime can be the apostrophe.

Press the Enter key to get th e derivative, and use the Simplify option in the Context Menu to get a simplified form of the derivative.

 

If seeing the Newton iterates is important, the Student:-Calculus1:-NewtonsMethod command implements Newton's method and can return a sequence of iterates, or just the "answer", or even a plot of the tangent-lines whose x-intercepts are the Newton iterates.

 

Of course, the fsolve command is a more robust solver. On the other hand, the Student:-Calculus1:-Roots command is also useful, since it returns all roots in a bounded interval, symbolically when possible, or numerically.

 

The RotFinding:-Analytic command uses complex-variable theory to determine all roots in a regionof the complex plane. If a narrow rectangle is described about the real axis, it is possible to use this command to find all roots in a bounded real interval.

Right-click on a Maple graph to bring up the graph's Context Menu. There, you will find the option Probe Info that gives the choices None (default), Cursor position, Nearest point online, and Nearest datum. The Cursor position option changes the cursor to a cross-hair that will display the coordinates of the center of the cross. The other two options behave as a trace, and follow the curve while displaying the coordinates of points along the curve. To write the coordinates to the clipboard, again right click, and in Probe Info, select Copy Data. Once the coordinates are on the clipboard, they can be pasted into the worksheet (will be in the form of a column vector).

ThU's graph (generated by Explore) makes finding the vertices of the quadrilateral easier. Expressed as vectors (counterclockwise around the quadrilateral), these are

v1:=a*<1,1>/4;

v2:=a*<2,1>/5;

v3:=a*<2,1>/3;

v4:=a*<1,1>/2;

As suggested by ThU, enclosed area can be found by Green's theorem, provided the vector field is appropriately chosen. There are options, and the following one works.

F:=VectorField(<0,x>);

The enclosed area is then obtained by the line integral of F around the quadrilateral.

LineInt(F,LineSegments(v1,v2,v3,v4,v1));

 

To follow ThU's suggestion whereby the quadrilateral is split into two triangles, use

int(1,[x,y]=Triangle(v1,v2,v4))+int(1,[x,y]=Triangle(v2,v3,v4)) assuming a>0;

Let sys represent the ODE (in variable y(x)) and its initial conditions. Then the simplest way to obtain a graph of the solution is to use the odeplot command. Look up its syntax to apply modifications to the basic graph produced by this command.

Q:=dsolve({sys},y(x),numeric):

plots:-odeplot(Q);

Unless there is a specific need to obtain the numeric procedure that represents the numerically computed solution for y(x), there's no intrinsic reason for adding the complication of extracting and graphing that procedure.

First 18 19 20 21 22 23 24 Page 20 of 27