## Ordinary and Partial Differential Equations..?? h...

Ordinary and Partial Differential Equations..

## How do I solve a Ordinary and Partial Differential...

(Driven damped simple pendulum, a nonlinear differential equation) The equation of motion of the damped simple pendulum

driven by a harmonic force is given by

By an appropriate choice of the coefficients m, l, g, A, ω and the initial conditions. Write a

maple code to solve this equation using fourth-order Runge-Kutta method. Comment your

.results

## Taylor Series for an Implicit Function...

I am considering a function y(x) which is defined implicitly such that:

y(x):= x-> ln((1+x)*y) + exp(x^(2)*y^(2))

I am attempting to show that the Taylor series about x = 0 is:

y(x) = 1 - x^2 - (1/3)x^3 + (55/24)x^4 + (4/5)x^5 - (439/80)x^6 + O(x^7)

This could be done by using Maple to take derivatives up to sixth order and then substituting into the formula for the Taylor series.  My initial idea for the Taylor series was to use the identity

ln((1+x)*y) + exp(x^(2)*y^(2)) = x + cos(x)

but obviously the RHS does not give the required form for the Taylor series about x = 0 (although I can use it to show that y(0) = 1).  Would it be possible to use Maple to take six derivatives of the left-hand side instead and then use that to create the Taylor series as far as sixth order?

## How to change recursion formula...

Hello

In my annuity recursion formula I have a payment at the beginning of the month.

How can I change the formula to reflect an addition made on a different day of the month?

This could be done in Excel of course, but I am looking for a single formula which rsolve supplies.

I had no joy with Finance:-growingannuity

Recurring_pmts.mw

## How do I compute a Numerical Solution to the Orbit...

I am trying to use Maple to compute the numerical solution to the Newton/Einstein orbital equations and then to plot r(phi) against phi in polar coordinates (obviously without the relativistic correction this should be a flawless ellipse).

I have seen that problems trying to solve ODEs/PDEs are fairly common with people who are new to Maple.  The problem I have is that when I define the ODE with the second derivative, it evaluates the derivative so when I try to use dsolve I get the error message that it was 'expecting' ode to be a differential equation.

ode := diff(1/r(phi), [phi\$2]) + 1/r(phi)=GM/h^2;     [(where constants are defined such that GM/h^2 = 1)]
dr :=diff(r(phi),phi);

ics := r(0)=2/3, dr(0)=0;

dsolve([sys,ics]);

Also, I am not sure how to define one of the conditions when it is a derivative such that it can be included with sys, although I hade made an attempt.  The other examples I have seen just have functions defined at a particular value, rather than a derivative of the function.  When I try to use dsolve (regardless of the other problem), I get the message 'Error, (in dsolve) not a system with respect to the unknowns {r(0), (diff(r(phi), phi))(0)}'.  Once I have the solution I would like to plot r(phi) against phi for 0 < phi < 2pi to observe the full orbit and then do the same for 0 < phi < 10pi once I have repeated the numerical solution for the orbital equation with relativistic correction so that I can observe that the precession of the perihelion between each revolution is approximately constant.

I am also not sure how to find the angular positions of the four perihelia after the first revolution, is there a command that will enable me to determine the distance from the origin of the orbit to the closest point on the orbital path for all of the revolutions over the range 0 < phi < 10pi, as I will then be able to make a comparison with each one to check that the precession is approximately constant.

## 2 basic questions on patmatch...

First, is patmatch command is the main Maple command for doing pattern matching on expressions?

I trying to understand how it works, but failing on the most basic expressions. 2 basic questions

1)patmatch( x^n/y^n,  x∷symbol^n::symbol /  y::symbol^n::symbol);
false

It did not like that I told it x::symbol in the above. Why? But when I remove ::symbol it works

patmatch(x^n/y^n,x^n::symbol/y^n::symbol);
true

But when I do "whattype(x);" Maple replies saying it is "symbol"

2)Trying to match x^2/y^2, not having any luck
patmatch(x^2/y^2,x^n::nonunit(integer)/y^n::nonunit(integer));
false

patmatch(x^2/y^2,x^n::integer/y^n::integer);
false

How to match x^2/y^2? Why the above fail?

I learn better by examples. Is there a place where one can look at many examples using patmatch?

The help page have only few examples, and the link to the page called "examples,patmatch" does not help either with few examples and many are the same as the other page.  I tried to run it using

infolevel[all]:=5:
printlevel:=10:

To see if I can figure what is wrong, but did not understand any of the code printed.

Compare this to Mathematica, where pattern matching there has hundreds of examples and detailed tutorials just on this one subject.

## How do I find the Values of Constants in a Functio...

I have a function of the form:

y:= x-> ((1 + ax + bx^2)/(1 + cx + dx^2))*(ln(sinh(x)^2 + cosh(x)^2)

I would like to know how I could use Maple to calculate the values that the constants a,b,c and d should take such that the expansion of the above function does not include powers of the order x^3, x^4, x^5 or x^6 ie. such that the powers are quadratic at most.

The trigonometric terms just to clarify are the square terms ie. sinh(x) * sinh(x), but that is how I have written them before with Maple.  Not sure if I have written it out correctly, but it is a fraction with the constants multiplying the natural log function whose argument is the sum of the squares of the hyperbolic trigonometric functions.

## Plotting Variables From Indexed Table....

How do I access and plot the values from indexed tables QQ vs  PP?

 (1)

 (2)

 (3)

 (4)

## flexible beam with compliant joints...

I am trying to expand the ridgid beam model to flexible beam model to 1.) use fixed walled end to calulate cantilever deflection from a constant load, and visualize deflection; and then 2.) incorporate a compliant walled joint (rotary joint) with stiff rotational spring. To get angles of rotation; and finally simulate a periodic force and calc/plot all reactions/theta(t).

There is a video on line of a round beam with fixed-fixed ends and a translating weight with deflection visulized, but only a you tube vid can be found of this set-up.   It is close to what I need.

Lastly, if anyone knows how to send the diagram to maple as in A:=MapleSim:-___()

This method to transfer from Sim to maple with diagram and current session(#?) was done in a tutorial vid from MapleSim session. I am using Maple/MapleSim 2017 which is difficult to follow changes in workspace and commands from vids/tutorials.

PS. I have connected through opening a new worksheet and explicitly opening by filename.

## Font change for output...

ENTIRE_FUNCTION_CHECK_GOOD_COPY.mwSorry for the silly question, but i have actually tried to find it in the help pages i swear.

how do i change the font size of the output?

I am making some educational worksheets and the problem ive faced is that all of people i know

online are mathematica users or others, so i am designing the worksheets in such a way that it requires 0 understanding of maple for the student, but can  be readily used as an educational tool.

They are all going to be aimed  for undergraduate level, and designed to investigate questions that are not answered by plugging the function into wolfram alpha.

A draft of one attached, any general advice for this project appreciated.

## why my solutions lost?...

I am trying to find for the equilibrium but why my solutions lost?

 >
 >
 (1)
 >
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 (9)
 >

 >
 >
 (1)
 >
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 (9)
 >

## how to calculate a reduced groebner basis ...

It is a truth universally acknowledged, that a single man in possession of an algorithm for calculating a Groebner basis, must be in want of an algorthim for calculating a reduced Groebner basis.

It seems odd that i can't find something in the Groebner package - if there isn't something there, I assume that there is a well known piece of code for doing this!

## [Physics] how determine components of a vector...

I want to determine components of a vector in explicit form.  Let I have vector nn[mu] with components (1,0,0,0). Is it possible to explain to Maple it?

I tried to do the next:

with(Physics);
Setup(dimension = 4);
Setup(metric = {(1, 1) = -1, (2, 2) = -1, (3, 3) = -1, (4, 4) = 1});
Setup(mathematicalnotation = true);
Coordinates(X);
Setup(tensors = {nn[mu](X)});
nn[mu] = Matrix(1, 4, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 1});
nn[mu]*k[mu];
SumOverRepeatedIndices(%)

The answer that maple gives is:

nn[1]*k[`~1`]+nn[2]*k[`~2`]+nn[3]*k[`~3`]+nn[4]*k[`~4`]

So, doesn't Maple understand that nn[1]=nn[2]=nn[3]=0?

## Trouble solving a transcendental equation...

I am still working on the worksheet linked below.  But I have run into trouble solving the equation symbolicly within for the variable t.  I think this is due to the fact there are multiple solutions and the commands I employed through the GUI interface is not capable of handling this issue?  For example, the solutions for sin(pi*t/T) would be N*T.  MAPLE is simply stating t=0.  So I think this is why my solutions are failing to produce results.

What other commands should I be employing?

solving_transcendental.mw

## How to animate plots generated using sequence of c...

Imagine three isosceles triangles with coordinates of each stored in a matrix such as:

> coord1:=Matrix(3,2,[0,0,5,0,2.5,4]);

> coord2:=Matrix(3,2,[2,0,7,0,4.5,4]);

> coord3:=Matrix(3,2,[4,0,9,0,6.5,4]);

and plotted together as follows (only the first is shown)

> PLOT(CURVES([[0,0],[5,0],[2.5,4],[0,0]]),COLOR(HUE,1));

I want to create an animation with stationary (original) isosceles triangles in the background along with new isosceles triangles generated by incrementally (say 4 increments) moving only the apex of each triangle until it touches the base of the triangle; obtained by multiplying the apex’s vertical coordinate by (say ¼) in each increment using a do loop.