Scot Gould

## 717 Reputation

11 years, 140 days
Claremont McKenna, Pitzer, Scripps College
Professor of Physics
Upland, California, United States
Dr. Scot Gould is a professor of physics in the W.M. Keck Science Department of Claremont McKenna, Pitzer, and Scripps Colleges - members of The Claremont Colleges in California. He was involved in the early development of the atomic force microscope. His research has included numerous studies and experiments using scanning probe microscopes, particularly those involving natural fibers such as spider silk. More recently, he was involved in developing and sustaining AISS. This full-year multi-unit, non-traditional, interdisciplinary undergraduate science education course integrated topics from biology, chemistry, physics, mathematics, and computer science. His current interest is integrating computational topics into the physics curriculum. He teaches the use of Maple's computer algebraic and numerical systems to assist students in modeling and visualizing physical and biological systems. His Dirac-notation-based quantum mechanics course is taught solely through Maple.

## If you prefer palettes and 2d input...

 >
 >
 (1)
 >
 (2)

But, add is not the same as summation

 >
 (3)

However, you can use the palettes to do an add as well

 >
 (4)
 >

Other examples can be found at this link.

It depends upon what your goals are. My differential equations represent physical systems. Hence, I want them to think about a physical interpretation of the equilibrium points.

In my experience of teaching Maple to new users, I have found the workbook mode better at organizing the content. And, it provides a structure for them to add text groups, comments, separate problems, etc.

Using dot notation for differentiating with time...

 >

where the values of the constants are:

 >

The expected equilibrium points are where the rate of change vanishes:

 >
 (1)

Solving for where p, g are constant:

 >
 (2)

There are six locations. The most interesting ones are the last pair.

Evaluation with numbers:

 >
 (3)

For the development of the system, insert the values into the set of all equations:

 >
 (4)

Solve, but make the output a list of procedures.

 >
 (5)

Extract out these procedures and use them as if they were functions.

 >

It is ready to plot. But before we do, we have to set the values for the initial values of p and g.

 >

Plotting the results given these initial conditions:

 >

We see where the evaluation of the system occurs. Physically, this is when we have waited a long time.

So, using the functions, we enter some large values for time:

 >
 (6)

The advantage of setting the initial values as parameters is that we can create a  "what if" scenario.  To do so, we create a plot procedure that sets the values of the initial values and then plots the system.

 >

Now, we Explore the plot:

 >

Now the user can locate the 3 pairs of equilibrium locations themselves.

Using parameterized solutions and Exploring them is so useful that I made a video (and linked to the associate document), which you can find here

https://youtu.be/6FDs8lDXGCs

The first expression is to be simplified. The second expression is an option assumed to be a side relation. Hence, it attempts to simplify only the first, giving the truth about the second.

https://www.maplesoft.com/support/help/Maple/view.aspx?path=simplify/siderels&cid=73

Hence, pass it one expression, which is the three answers within a list or set, as suggested.

## One way...

With limited information about what you want in the vectors for the matrix....

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)

 >
 >
 (1)
 >
 (2)
 >

## Another way...

Using the palettes in 2d-input
* select  to enter

* <command>-<shift> (or <ctrl>-<shift> in Windows) <"> to create a vector sign:

 >
 (1)

Or use the expression

 >
 (2)

This assumes W is an array of values and  is an array of vectors

## 2d-input - just as you write it...

The advantage of the 2D input is that you don't have to learn as much to get more out of Maple. Write out the equations in Maple as you write them out mathematically:

 >
 (1)
 >
 (2)

Or, if you prefer to do the substituting yourself:

 >
 (3)
 >
 (4)

Or if you have a sequence of them:

 >
 (5)
 >
 (6)
 >

## One approach...

I'm uploading the file without showing the contents. MaplePrimes is not allowing me to show the content, as far as I can tell.

See if this works for you. Maple_Primes_Orthogonal_Trajectory.mw

## Maple and Math...

I see two problems.

1) `D` is reserved in Maple as an operator. So, use a different constant, such as k,

for this heat-equation type PDE.

2) Are you sure about those conditions? If I ask pdsolve to provide a solution

without any conditions, it returns two ODEs, one of which requires an initial

condition and the other requires only two boundary conditions.

 >
 (1)

## Another version with Explore...

 >

Calculating the coefficients as given by the equation for a generic function f of

the variable x. ( is created by writing BesselJ when needed, hitting the esc button, selecting

the proper character, and filling in the details.)

 >

where:

 >

Testing for an example, such as yours.

 >
 (1)

Here is an example of how adding more terms does a better job in the

approximation. The function approximates up to N terms.

 >

Slide the slider to show how many terms are used to approximate:

 >

## And simple example...

Here is a worksheet I give new users that provides a simple example of animating ODEs using the Explore procedure.

LM_-_ODE_2_-_Numeric_-_Animate_and_Explore.mw

## Looks good to me...

@dharr 's answer looks fine to me

Let me give you one other example that might help:

A is a random matrix

 >
 (1)

M is a matrix of 999s

 >
 (2)

Into A, from rows 3 to row 5 at column 2 through column 3, copy M,

rows 1 through rows 3 at columns 3 through column 4.

 >
 (3)

Now, what is A?

 >
 (4)
 >

## Confusion, but maybe this works...

I'm a bit confused as to what you want to do. Extend is a procedure in the ArrayTools package.

Are you trying to add another column?  If so, two elements are required. Are you trying to add

another row? That requires four elements.  But you provided three. Hence the confusion.

Personally, I prefer to use the brackets technique to create vectors or matrices:

 >
 (1)

Add another column of zeros by adding a vector  to the matrix

 >
 (2)

 >
 (3)

## MakeFunction...

Just a heads up. There is a problem in your worksheet that others did not point out,

although mmcdara corrected.

When you extract your solution, you cannot immediately apply it as the expression

for a function. (I wish one could, but it would break Maple.)   It may look like it is

working, but it is not.

Referring to your example, and after adding in the value procedure: (Allow me to

use 2d-input. This input does not affect the point of this post.)

 >
 >
 >

Going through step-by-step

 >

Simplifying deq_sol using the value procedure:

 >

Now the problem: Here is what happens when you directly assign the

the expression on the rhs of the equation to a function name:

 >
 (1)

Let's look at a value for your solution such as one at

 >
 (2)

Notice that the value of 3.2 is not substituted into the function.  Instead, Maple

returns the expression. Because it is just the expression,

the plot procedure works even though this is not a true function.

To make a function, you can either use the older procedure, unapply, or, since

you are using Maple 2024, you can use the new name: MakeFunction.

 >
 (3)

Now it will act like a function:

 >
 (4)
 >
 (5)

I also agree with mmcdara that you would benefit from creating a function out of both

t and Cl.

I hope you found my comment useful.

## Functional approach...

I concur. It appears the only way to generate a solution is to do

it numerically. However, one can make a function out of the integral.

If we pull out the term:  , we are left with just the integral

 >

Testing it for :

 >
 (1)

I don't have time to try it out, but you might be able to generate

a polynomial series approximation to the integral from the data.

Looking at two plots.

 >
 >