Items tagged with expression expression Tagged Items Feed

I have a long expression with different order derrivatives, that is written in form like that:

-(D[1](f))(x, y)

I'd like to transform it into standard maple form like:

diff(f(x,y),x)

Is there any special procedure to achieve this goal?

how to add another line in this template of formula

use the expression template  

how to add another line like

 

thank you in advance for your help

Hi Everyone,

I have an expression that contains a second order derivative: EXPR:=ay''(x) + bz'(x) + cf'(x)+... The variable y  obeys an ordinary differential equation, y''(x) = f(y,x). I would like to replace the second order deriavtive in my expression with f(y,x). So far I have tried applyrule([y''(x)=f(y,x)],EXPR), subs(y''(x)=f(y,x),EXPR) and algsubs(y''(x)=f(y,x),EXPR) and nothing seems to work. Any helpful suggestions?

 

I have question about how to write the expression to get the order in the sequence?

For exmple, if I have this sequence,

E:=[0,2,7,15,26,40]

I want to write a procedure that tells me the location of any input,x in the sequence E.

For example, if I choose x:=3, then the number 3 is actually between 2 and 7, so it will give me the answer C(x)=3 (because 7 is the third elemet).

I try to write the procedure but there always wrong! I do not know what expression should I write!

C:=proc(x)
local
for i from 1 to nops(E) do
if x<=E[i] then
c:=E[i]
fi;od;
end;

Please help! 

Successively transform the expression x + y + z into x ∗ y ∗ z and [x, y, z], using Maple commands.

it is not a maple question, but i need it before running in maple

could you give a help?

how to get a list of terms of expression such as x+z^2 in gap system?

how to convert to a list [x, z^2] for for loop to get each terms?

x+2*y+z^2

expected output for for loop

for i in List(x+2*y+z^2) do
    print(i)

x
2*y
z^2

Hi There

I'm getting started with maple and facing a doubt about using subs, somehow it does not seem to work, this is my expression:

 

> restart;
> theta := omega*t-k*x;
                                omega t - k x
> phi[1] := -(1/2)*H*c*cosh(k*(z+h))*sin(theta)/sinh(k*h);
                   H c cosh(k (z + h)) sin(-omega t + k x)
                   ---------------------------------------
                                 2 sinh(k h)              
> diff(phi[1], t, t);
                                                             2
                H c cosh(k (z + h)) sin(-omega t + k x) omega
              - ----------------------------------------------
                                 2 sinh(k h)                  
> td := simplify(subs(z = 0, %));
                                                          2
                   H c cosh(k h) sin(-omega t + k x) omega
                 - ----------------------------------------
                                 2 sinh(k h)               
> simplify(subs(cosh(k*h)/sinh(k*h) = 1/tanh(k*h), %));
                                                          2
                   H c cosh(k h) sin(-omega t + k x) omega
                 - ----------------------------------------
                                 2 sinh(k h)               
I cannot subs cosh/sinh = tanh. I would like to know why.

Any tips? Thank you

Dear all, 

I'm trying to extract the coefficients from the equation below, the fat expressions in the equation. I don't have any trouble seperating the sine or cosine functions. But the constants are a problem. Since t is the only variable in the function i tried, coeff(R, t, 0). This does not work apparantly. Any suggestions? 

 

R:=(1/12)*C2^3*cos(2*t) - (1/48)*C2^3*cos(4*t) - C2^3*sin(t) + C2^3*sin(3*t)-C2^2*C4*cos(t) + C2^2*C4*cos(3*t) - (1/8)*C2^2*C4*sin(2*t) + (1/16)*C2^2*C4*sin(4*t) + (1/16)*C2*C4^2*cos(4*t) - C2*C4^2*sin(t) - C2*C4^2*sin(3*t) - C4^3*cos(t) - C4^3*cos(3*t) - (1/24)*C4^3*sin(2*t) - (1/48)*C4^3*sin(4*t) - (1/16)*C2^3 - (1/16)*C2*C4^2 - (1/2)*C2*cos(2*t) + C2*sin(t) + C4*cos(t) + (1/2)*C4*sin(2*t) + (1/2)*C2

I wish to substitute Re=W[0]/V[0] in the expression V[0]/W[0] * diff(u(t),t). I tried using the subs command but it didn't work. Any help would be appreciated !

Hello those in Mapleprimes,

 

I want to know whether there is a good way to modify the first expression to the second one below.

first expression: 

> p+p^(-1/(theta-1))*sum(q[i]^(theta/(theta-1)), i = (1 .. n));

second expression:

> p^(-1/(theta-1))*(p^(theta/(theta-1))+sum(q[i]^(theta/(theta-1)),i=1..n));

First and Second are the same. But, I want to know how I can modify from the former to the latter.

 

Thank you in advance.

 

taro

 

For context, I'm designing a work sheet based around quantum tunneling. Currently I'm looking at the boundary conditions.

What I want to be able to do is to set the expression psi[1] equal to psi[2], but only for the value x = 0. Is this possible? I've tried using if statements, and I've considered converting these expressions into functions for this purpose, but I'm not having much luck. 

Thanks

Blanky

I have system of equation contain of two equations

eq1:=a1*x^2+b1*y^2+c1*x*y+d1*x+e1*y+f1:
eq2:=a2*x^2+b2*y^2+c2*x*y+d2*x+e2*y+f2: 

I want to find the number k so that the equation

a1*x^2+b1*y^2+c1*x*y+d1*x+e1*y+f1 + k*(a2*x^2+b2*y^2+c2*x*y+d2*x+e2*y+f2) = 0

can be factor, where k satisfy

a:=a1+k*a2:
b:=b1+k*b2:
c:=c1+k*c2:
d:=d1+k*d2:
e:=e1+k*e2:
f:=f1+k*f2:

I tried

A:=a*x^2+b*y^2+c*x*y+d*x+e*y+f:
collect(A,x);
B:=collect(discrim(A, x), y);
C:= discrim(B,y);

and got the expression

-16*(4*a*b*f-a*e^2-b*d^2-c^2*f+c*d*e)*a=0.

For example 

> restart:

a1:=14:

b1:=-21:

c1:=0:

d1:=-6:

e1:=45:

f1:=-14:

a2:=35:

b2:=28:

c2:=0:

d2:=41:

e2:=-122:

f2:=56:

a:=a1+k*a2:

b:=b1+k*b2:

c:=c1+k*c2:

d:=d1+k*d2:

e:=e1+k*e2:

f:=f1+k*f2:

P:=c*d*e+4*a*b*f-a*e^2-b*d^2

-f*c^2:

eq1:=a1*x^2+b1*y^2+c1*x*y+d1*x+e1*y+f1:

eq2:=a2*x^2+b2*y^2+c2*x*y+d2*x+e2*y+f2:

with(RealDomain):

Q:=solve(P=0,k);

factor(eq1+Q*(eq2));

solve([

eq1=0,eq2],[x,y]);

Where, Q is k which I want to find. 

My question is, if I have the system of equations

eq1:=a1*x^3+b1*y^3+c1*x^2*y+ d1*x*y^2 + e1*x+f1*y+g1:
eq2:=a2*x^3+b2*y^3+c2*x^2*y+ d2*x*y^2 + e2*x+f2*y+g2

How can I get a similar to the 

-16*(4*a*b*f-a*e^2-b*d^2-c^2*f+c*d*e)*a=0?

 

 

 

I am new user of Maple. I have an expression like f(x,y)/g(x,y) and I want to have Maple name f(x,y) as something simple like "h" so that later equations write h/g(x,y) instead of the complete f(x,y)/g(x,y), and also to be able to simplify other equations in terms of h.

For example, a=(x+1)(y-5)^2/(x+y-3). Can I get Maple to let h=(x+1)(y-5)^2, so that I get h/(x+y-3) when I ask for a?

Sorry if this question is basic (and my math terminology incorrect), but I have been trying for a while.

I would like to tell Maple to evaluate all numbers in an expression using floating point numbers (of a desired precision). Short example:

evalf[30](x^(1/12));

prints

x^(1/12)

while I want it to print 

x^(0.0833333333333333333333333333333)

Note that the real expression may be arbitrarily complicated. I know that it is possible easily because I have already seen this somewhere, but I don't remember it. 

I'd like to bind a symbol to some expression, but display the expression analytically before evaluating, and show the value on the same line (not new line).

Something like:

restart;
a:=10: b:=3:
f:='a+b^2';`=`,f;

But this display the expression and its numerical value on 2 lines. I'd like to get this output:

      f:=a+b^2 ,`=`,19  

This is just so I can see the expression before it is evaluated, and its numerical value on same line. Or if there is a better way do this. I tried using print, but could not get the assignment to work then.

 

1 2 3 4 5 6 7 Page 1 of 7