## Using subscripts to solve equations?...

I'm trying to calculate forces between particles. I defined all my variables and the equation for force, but when I plug it all in, it gives me 0 when I know for a fact it's not 0. I should be getting something like f12=-0.4, f13=-0.24, and f23=-0.5.

failforce.mw

Basically I defined variables like x1,y1, m1 , etc. and made my force equation fij with all variables having appropriate i and j subscripts.

## Cannot parse ':=' in a component field, is it prot...

Hey, I'm sitting with an extremely annoying problem. Basically, I want a "Mathematical Expression" component to include a definition of a variable, so I want it to say, for example, "h := 3", now, I can easily type this into the component field myself, and it all works great, but I want to manipulate the field with a button component. Every time I attempt it, it seems as if the ":=" symbol is protected, however I can write it myself without trouble.

## Name assignment to a function...

I am using Maple 2015 and when assigning a name to a function or expression and hit enter, it appears like in the following picture.

However, I want to make it appear like in the following picture:

How can I make that ?

Thank you !

## multiple assignment...

> restart;
> n := [1, 2, 3, 4, 5]; pr := .71; p := 0; q := 0; b := 0; l := 0; s := 0;
> for j to nops(n) do R1 := 2*n[j]/(1+n[j]); R2 := 2*p/(1+n); sys := diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))+1-(diff(f(eta), eta))^2 = 0, (diff(diff(theta(eta), eta), eta))/pr+f(eta)*(diff(theta(eta), eta))-R2*(diff(f(eta), eta))*theta(eta) = 0; bcs := f(0) = 0, (D(f))(0) = l+b*((D@@2)(f))(0), (D(f))(-.5) = 1, theta(0) = 1+s*(D(theta))(0), theta(-.5) = 0; proc (f1, th1, { output::name := 'number' }) local res1, fvals, thvals, res2; option remember; res1 := dsolve({sys, f(0) = 0, theta(0) = 1+th1, (D(f))(-2) = f1, (D(theta))(-2) = th1, ((D@@2)(f))(0) = f1-1}, numeric, :-output = listprocedure); fvals := (subs(res1, [seq(diff(f(eta), [`\$`(eta, i)]), i = 0 .. 2)]))(0); thvals := (subs(res1, [seq(diff(theta(eta), [`\$`(eta, i)]), i = 0 .. 1)]))(0); res2 := dsolve({sys, f(0) = fvals[1], theta(0) = thvals[1], theta(1) = 0, (D(f))(0) = fvals[2], (D(f))(1) = 0}, numeric, :-output = listprocedure); if output = 'number' then [fvals[3]-(subs(res2, diff(f(eta), `\$`(eta, 2))))(0), thvals[2]-(subs(res2, diff(theta(eta), eta)))(0)] else res1, res2 end if end proc; p1 := proc (f1, th1) p(args)[1] end proc; p2 := proc (f1, th1) p(args)[2] end proc; p(.3, -.2); par := fsolve([p1, p2], [.3, -.2]); res1, res2 := p(op(par), output = xxx); plots:-display(plots:-odeplot(res1, [[eta, f(eta)], [eta, theta(eta)]]), plots:-odeplot(res2, [[eta, f(eta)], [eta, theta(eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta, eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta, eta)]])); fplt[j] := plots[odeplot](sol1, [eta, diff(diff(f(eta), eta), eta)], color = L[j], axes = boxed); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = L[j], axes = boxed) end do;

Dear Sir

In this above problem it showing that error as  Error, cannot split rhs for multiple assignment please can you tell why it is showing like this  ?? and where i did multiple assignments ??

## How to integrate the complex equations!...

Here is my code. I am deriving soil compression line for oedometric testing with porosity, below is a part of the derivation.

I would like to differentiate the (Sst/Vst)/(Spt/Vpt) by dsm first then integrate it with dsm ranges from 0 to dmax to get my final answer...

Hope someone can help me on writing the code... Thank you very much!!!

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

## Analysis and Design of Machine Foundation...

ANALYSIS AND DESIGN OF MACHINE FOUNDATION

 (1)

 Introduction This document deals with vibration analysis and design of machine foundations subjected to dynamic load.

 (2)

 (3)

 Richart and Lysmer's Model Richart et al. (1970) idealised the foundation as a lumped mass supported on soil which is idealised as frequency independent springs which he described in term of soil parameter dynamic shear modulus or shear wave velocity of the soil for circular footing when footings having equivalent circular radius. The Tables below shows the different values of spring and damping vlaues as per Richart and Lysmer. In which, G = dynamic shar modulus of he soil and is given  ; ν = Piosson's ratio of the soil; ρs = mass density of the soil; Vs = shear wave velocity of the soil obtained from soil testing; g = acceleration due to gravity; m = mass of the machine and foundation; J = mass moment of inertia of the machine and foundation about the appropriate axes; K = equivalent spring stiffness of the soil; C = damping value of the soil; B = interia factor contributing to the damping factor; D = damping ratio of the soil; r = equivalent radius of a circular foundation; L = length of foundation, and B = width of the foundation.

 Sketch

Table : Values of soil springs as per Richart and Lysmer (1970) model

 SI No. Direction Spring value Equivalent radius Remarks 1 Vertical This is in vertical Z direction 2 Horizontal This induce sliding in horizontal X 2.1 Horizontal This induce sliding in horizontal Y 3 Rocking This produces roxking about Y axis 3.1 Rocking This produces roxking about X axis 4 Twisting This produces twisting about vertical Z axis

Table : Values of soil damping as per Richart and Lysmer (1970) model

SI No.

Direction

Mass ratio (B)

Damping ratio and Damping values

Remarks

1

Vertical

This damping value is in vertical Z direction

2

Horizontal

This damping value is in lateral X direction

2.1

Horizontal

 (5.1)
 (5.2)

This damping value is in lateral Y direction

3

Rocking

 (5.3)
 (5.4)

This damping value is for rocking about Y direction

3.1

Rocking

 (5.5)

This damping value is for rocking about X direction

4

Twisting

 (5.6)

This damping value is valid for twisting about vertical Z axis

 (4)

Vertical Motion Considering damping of the Soil

For vertical direction the equation becomes that of a lumped mass having single degree of freedom when

 (6.1)

 (6.2)

 (6.3)

By algebraically manipulating the expression, the form traditionally used by engineers is derived:

 (6.4)

 (6.5)

This form includes the damping ratio , the natural frequency , and the external forcing term .  Consider only free vibration by setting

 (6.6)

 (6.7)

Good Morning Mapleprime Community,

Would anybody please help in the attached worksheet. I'm trying to use the new function in Maple that is the clicable method, but I was having problem in some of my output such as zeta_y and zeta_phi as this two equations are generating an error message.

Regards,

Moses

## Student input as variable in Maple TA assignment...

Is it possible to have an input box, where the student can give an input (integer) and this is then used in the following questions in an assignment?

e.g. in the first question the student is asked to give his student number, in the second question this number is used to create random parameters.

## limit on elements of a Record...

Hi,

Following situation: I have Records with several members. These members in turn have varied expressions assigned to them: some have numbers, one has a Matrix, some have formulae. Example:

q:=Record(l=len,k1=kl/len,R=(a 6x6 Matrix dependent on len and kl/len));

I want to be able to use the limit command on each of the members of q such that each member gets assigned the correct limit of its expression. I.e. I want to write a function limit2 such that

limit2(q,len=0);

yields

Record(l=0,k1=infinity,R=(limit~(the Matrix,len=0))

The trick here is that the members of the Record vary for different Records but I want to write a function limit2 that works for all of these. I can make a list of the members by using exports(q) like this:

exlist:=[exports(q)];

and after some fiddling I found that I can run limit on each member in turn:

for nam in exlist do
limit~(eval(parse(cat(elm,":-",eval(nam)))),len=0)
end do;

What I have not been able to do is putting the result back into the member of the Record. Usually I would use assign for such a task, but I am unable to get the correct name on the left side that lets me assign to it. These names would of course be q:-l, q:-k1 and q:-R in the above example. I tried the parse(cat(...)) construct above and variations, but in the best case the assignment does not happen, in worse cases I get an error thrown. Never do I get the actual assignment.

Any hint how to do this?

TIA,

M.D.

PS: FWIW, I am doing this on Mape 15.

## there is a way to use assignments in another Maple...

I'd like to tell a new worksheet to use assignments created in another document. This is to save time retyping equations.

And, is this something that others like to do ?

Thanks.

Cheers !

## Subtract values of variables in "PolynomialSystem"...

Hi,

I have the following code for using "PolynomialSystem" solve equations of polynomial

*********

with(SolveTools):

f:=PolynomialSystem({x+y-3, x^2+y^2-5}, {x, y}):

print(x,y);
print(f);
f[1];f[2];
a:=f[1][1];b:=f[1][2];
print(a,b);
c:=-evalf(a);d:=-evalf(b);

****************

The output is

***

x, y
{x = 2, y = 1}, {x = 1, y = 2}
{x = 2, y = 1}
{x = 1, y = 2}
x = 2
y = 1
x = 2, y = 1
-x = -2.
-y = -1.

***

From what I have seen, I cannot subtract the values of x and y as 2 and 1. Is there any way that I can get the values of solutions of variables, namely I can assign a variable "a" as 2, and the other variable "b" as 1?

Thank you very much!

## Why can I not define the square of a function/vari...

Greetings,

Maple 15 allows the following syntax

omega := sqrt(w0^2*(1+((z-zf)/z0)^2))

But it does not allow this one

omega^2 := sqrt(w0^2*(1+((z-zf)/z0)^2))

Why is this so for functions and variables? Is there any way around this, I am really bugged by this issue. The Maple Math told me that the syntax was invalid so I had type the commands directly.

## Assigning vectors and matrices...

This seems such a simple/basic question I'm almost too embarassed to ask.

Anyway. this is causing me some headaches

> A := <0|0>;

A:= [0 0 ]

> B := A:

> A(1,1) := 2 ;

A:= [2 0 ]

> B;

B:= [2 0 ]

What do I do to prevent the elements of B changing if A changes, after using the assignment B:=A (or should I not be using this assignment?)  I mean, I would like the same behaviour as

> a := 0;

a:=0

> b := a;

b:=0

> a := 2;

a:=2

> b;

b:=0

which seems to work as I "expect"...

## How to group grades for questions in an assignment...

It is possible to add groups of questions to an assignment in Maple T.A. But how do you see the grades divided into these groups? As an example, suppose we have two groups of questions say 5 questions in the group "algebra" and 5 questions in the group "geometry". The class grades show the grades for all 10 questions all together, but I would like to see the grades for two groups individually.

## Assigning variables in a list to another variable ...

I have a vector of lists, and each list is composed of indexed names.  For each list, I would like to assign all the indexed names in the list to the first variable of the list.  Right now, I'm trying to select the entries of the list using the op command and then assign one to the other, and get the following error:

Error, invalid left hand side in assignment

June_29.mw

Thanks!

## Max/Min Problems in Maple 17...

Hello All,

I have had a few questions that have come up while working on a Maple Assignment for my Calculus III class. I was wondering if anybody could help me with these questions, as well as show me how to enter them in Maple. Here are the questions I have been struggling with.

1. In the xy-plane, graph the ellipse ((x-4)^2)/(4))+(y-4)^2=1 and two level curves of F(x,y)=x^3+y^3-3xy that just touch the ellipse.

a. What do we know about the gradients of F and the ellipse at those points?

b. Use your graph to approximate the minimum and maximum values of F subject to the constraint ((x-4)^2)/(4))+  (y-4)^2=1.

2. A company manufactures a product using inputs x,y,z according to the production function Q(x,y,z)=20x^(1/2)y^(1/4)z^(2/5). The prices per unit are \$7 for x, \$12 for y, and \$18 for z.

a. Create the cost function

b. The company wants to produce 2500 products. Estimate the minimum cost by using the graph of the level surfaces of the cost function (from part a) together with the production constraint.