Items tagged with variable variable Tagged Items Feed

Already searched and browsed multiple different threads and still cannot find a solution.

Apologizing the noob nature of this question.

 

 

In this code below, Why is the factor command not working?

f := a^2+x^2-2*ax;

a^2+x^2-2*ax

(1)

factor(f);

a^2+x^2-2*ax

(2)

expand((x-a)*(x-a));

a^2-2*a*x+x^2

(3)

``

NULL

NULL


Download factor_polynomial_2_multivariable.mwfactor_polynomial_2_multivariable.mw

 

Does anyone know what the default function is for the pre-subscript and pre-superscript?  I would like to use them for a variable name to represent the local reference frame and global reference frame in my multibody calculations.  Thanks

Hello people in mapleprimes,

I have a question:
What are you doing when you use maple in calculating, for example, your paper,
to avoid missing, for example, variables you use, or for your needs to look back the outcomes you obtained before?
If this is a paper-using work, on considering what to do next, you will read some pieces of papers you wrote and
on which you had calculated and obtained necessary equations. But, with small monitor 13 inch, and with
inconvenience of dealing with things in PC, compared with papers, I feel some stress in using maple in writing a paper.
So, now, I am asking you what kind of methods you has devised to make what you are writing compact and easy,
for you to handle with what you are writing.

I know surely that there are the document block, which enables output or input to not be shown, the workbook,
which is helpful in putting attached worksheets or jpg files together at one workbook, and the distinction of ":" and ";",
which in the case of the former, hides expressions in the outcome.

But, yet, I want to ask you about the ways you use to make it easy to write something.
If you have some, I will be very glad if you show it here.

Best wishes.

taro

 

 

 

 

 

 

Hello,

In some trigonometric equations, I have variables depending of time like Psi(t). I don't why after some manipulation my variable is transformed in :-Psi(t).

Have some ideas why some variables can be change with :- before ?

Here an example

ResolTrig.mw

It may come because of the code "Local Psi". I added this because it seemed to me that Psi was protected. Do I right? If not can I remove Local Psi?

Thanks a lot for your help

Hi,

It might be very silly question, but i dont know why it is not working out. So here is the question. In the attached maple shhet when i am trying to substitute eta(t)=epsilon*z(t) then it is not making that susbtitution for differential operator. Apart from that when i m collecting epsilon terms then also it not collecting it.quesiton.mw

 

Regards

Sunit

Hi 

My teacher (im studing Technology Management and Marine engineering) only allow that we use maple if we display the results between calculations. Is that posible:

 

a := 4;

b := 5;

Instead of :

a+b=9

I want it displayed as:

a+b= 4+5= 9;

or just

4+5 = 9; where a and b are Automatically replaced with the respective values, when i run the !!! button

 

A lot of my calculations are done by defining the variables in the top. 

Any ideas??

 

Thanks in advance.

 

Best regards  Carsten Moller

 

 

 

Hello,

I am using algorithmic variables to generate questions about the greatest common divisor of two integers.

Unforuntately the integers come out as 1,664 instead of simply 1664 (for example). How can I change the format to the simple version ?

Thanks for your help!

Elisabeth

I got a set of ecuations to solve, like this one:

eq[1]:=W[1,0]*(a*HRa[1,0]+b*ga[1,0]+c)=d*SR[1,1]

a,b,c,d are numbers, like 2.0458 and so on.

 

When I want to solve the set, I need to tell Maple the command solve:

solve( {seq(eq[i],i=1..N)},{variables});  (N is an integer of course)

 

To set the variables, one must check each equation to write: {W[1,0],HRa[1,0],ga[1,0]...} and so on.

I know that I can use the command is(variable,assignable) to check if a variable has not a value assigned already and, according to true/false I can construct the set {variables} and solve the set of equations.

That´s an easy solution if I need to check variables under a certain pattern, like: X[1].X[2],X[3] since I can create a loop and check them one after the other. But my problem is that I have different names for variables or that variables change to assignable from assigned according to other conditions, so I can never be sure if W[1,0] is going to be a variable to compute in all steps instead of SR[1,1].

for example:

if a>3 then
SR[1,1]:=1/2;
else
W[1,0]:=300:
end if;

So, when I need to type solve, the {variables} part is different according to each case. Is there any command that allow me to insert an expression and Maple can return me the variables or parameters in the expression that are not numeric already?


Thanks in advance.

Dear all

I have problem related to collection of coefficient of differtials in differential expression containing multiple dependent variables and we want to collect coefficient wrt to selected dependent variables. Please see attached Maple file for details.

 


with(PDEtools):

DepVars := [u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

[u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

(1)

alias(u = u(x, t), v = v(x, t), a[1] = a[1](t), a[2] = a[2](t), a[3] = a[3](t), b[1] = b[1](t), b[2] = b[2](t), b[3] = b[3](t), r = r(x, t), s[1] = s[1](x, t), p[1] = p[1](x, t), s[2] = s[2](x, t), p[2] = p[2](x, t))

u, v, a[1], a[2], a[3], b[1], b[2], b[3], r, s[1], p[1], s[2], p[2]

(2)

Suppose we differential expression like:

a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]+diff(p[1], t)+a[3]*(diff(p[1], x, x, x))+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]-3*(diff(r, x))*p[1]+(diff(a[1], t))*u*(diff(u, x))+(diff(a[2], t))*v*(diff(v, x))+a[2]*(diff(v, x))*p[2]+a[2]*v^2*(diff(s[2], x))+a[2]*v*(diff(p[2], x))+a[1]*u*(diff(p[1], x))+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))+3*a[3]*(diff(s[1], x))*(diff(u, x, x))+3*a[3]*(diff(s[1], x, x))*(diff(u, x))+a[3]*(diff(r, x, x, x))*(diff(u, x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+a[3]*(diff(s[1], x, x, x))*u+3*a[3]*(diff(r, x, x))*(diff(u, x, x)) = 0

3*a[3]*(diff(diff(r, x), x))*(diff(diff(u, x), x))+3*a[3]*(diff(s[1], x))*(diff(diff(u, x), x))+3*a[3]*(diff(diff(s[1], x), x))*(diff(u, x))+a[3]*(diff(diff(diff(r, x), x), x))*(diff(u, x))+a[3]*(diff(diff(diff(s[1], x), x), x))*u+diff(p[1], t)+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-3*(diff(r, x))*p[1]+a[3]*(diff(diff(diff(p[1], x), x), x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]+a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))+(diff(a[1], t))*u*(diff(u, x))+a[1]*u*(diff(p[1], x))+a[2]*v*(diff(p[2], x))+a[2]*v^2*(diff(s[2], x))+a[2]*(diff(v, x))*p[2]+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+(diff(a[2], t))*v*(diff(v, x)) = 0

(3)

We can collect coefficients of differential like u[x], u[x, x], v[x], u, vin following manner:

The Procedure

   

 

 

Now how can we collect coefficents with respect to u[x], u[x, x], v[x], u, vso that differential expression (3) appear as
"(......)*u+(.......)*v+(......)*u[x]+(........)*uu[x]+(.........)vv[x]+(........)u[xx]  =0....................."????????""

``


Download Collecting_Coefficients_in_Differential_Expression.mw

Regards

I have written the following coade in Maple:
r := 50;
l1 := 0.2742e-10;
s := I*w;
l := (-1.342110665*10^22*c^2*(Pi^4)-4.225000000*10^25*c^2*(Pi^2)+2.316990000*10^11*c1*(Pi^2)-1)/(-1.342110665*10^22*c^2*c1*(Pi^4)-7.140250000*10^43*c^2*c1*r^2*(Pi^4)+1.957856550*10^33*c^2*(Pi^4)+9.789282750*10^32*c*c1*(Pi^4)-1.690000*10^22*c*(Pi^2)-4.22500*10^21*c1*(Pi^2));
z1 := (c*l1*s^2+1)/(c*s);
z2 := l*s/(c1*l*s^2+1);
h := (z1+2*z2)*((z1+2*r)*(z1+3*z2)/(2*r)-2*z2)/z2-(1/2)*z2*(z1+2*r)*r;
f := h*(z1+3*z2)/z2-(z1+2*r)(2*r)*(z1+3*z2)+2*z2;
gain := 2*z2/f;
a := abs(gain);
d := diff(a, w);
s := subs(w = 2*pi*0.325e11, d)
Now, I have a function named "s" which I want to set to zero, and calculate the relationship between variables c & c1 in order to achieve this. How should it be done?
Thanks.

Hi, does anyone know how to choose the variables that populate the DAE Variables box when you use "equation extraction"?

I want the result to be in terms of the voltage source and the voltage drop across the capacitor for a RLC circuit.  I want to be able to choose the input-output variables for the final equation.

 

 

I try to make a question with an equation with numbered variables. This works fine when evaluating:

y=x1/x2

I need to have the lefthand variable indexed also like this:

y2=x1/x2

When entering y2=x1/x2 as the answer Maple TA won't evaluate it as a correct answer!?

I have the following equation:

Diff(W(t), t) = -q*V*(sin(Phi)-sin(Psi[s]))/(2*h*Pi);

I solve it for rhs() = 0:

soln := solve([rhs((2)) = 0, Phi < 2*Pi], [Phi], allsolutions = true,explicit);

This works and I get this result:

Now I want to get the first zeros, which occur for _Z1 and _Z2 equal to 0. So I substitute:

subs(_Z2=0,(3));

and get

In other words, the substitution did not work.

The original problem is embedded in a larger sheet created with Maple 15 and there it does work. It fails on Maple 2015.2. I then pulled out the relevant pieces to make this example demonstrating the problem (see the attached sheet, which has some of my other (unsuccessful) attempts to diagnose what is going on). It seems like the created variables _Z1 and _Z2 are somehow not recognized at all.

The only way I can get the _Z2 terms out is to substitute 2=0. This is really too icky to seriously consider, though.

Anyone has seen this before?

FWIW: Maple 2015.2 on Mac OS X 10.10.5.

Thanks,

Mac Dude

Assumptions_test.mw

Hi

i am working on a simple control project.i should make a transfer function from the below equation (as an example):

 (s^2*m1+I1*(s^2)*(1/r^2))*x(s)+(-(1/2)*s^2*b*m1-s^2*m1*r-I1*(s^2)*(1/r)+m1*g)*theta(s)+(1/2)*theta(0)*s*b*m1+theta(0)*s*m1*r-x(0)*s*m1+(1/2)*(D(theta))(0)*b*m1+(D(theta))(0)*m1*r-(D(x))(0)*m1+I1*s*theta(0)*(1/r)+I1*(D(theta))(0)*(1/r)-I1*s*x(0)*(1/r^2)-I1*(D(x))(0)*(1/r^2) = 0

in order to make the T.F i have to make " x(s)/theta(s) " on the lhs and put the rest on the rhs. i have no idea how to do so.(the underlined part involves no x(s) and theta(s). obviously a theta(s) will appear on the rhs in the one of the denominators which doesn't matter.)

please help me with this problem.since i don't know what the commands are called in english, i failed in searching for it.

thanks.

1 2 3 4 5 6 7 Page 1 of 7