MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

I have a nonlinear system with 4 equations and 4 unknowns. I am using fsolve. I know that there are multiple solutions for each variable but am only getting one. I need the others. what do I do??

This is my code:

R__1 := Matrix([[1, 0] , [0, 1] ]);

R__2 := Matrix([[1/2, sqrt(3)/2] , [-sqrt(3)/2, 1/2] ]);

R__3 := Matrix([[-1/2, sqrt(3)/2] , [-sqrt(3)/2, -1/2] ]);

R__4 := Matrix([[-1, 0] , [0, -1] ]);

R__5 := Matrix([[-1/2, -sqrt(3)/2] , [sqrt(3)/2, -1/2] ]);

 

d__1 := Vector( [ 0, 5.4] );

d__2 := Vector( [ 6.4, 4.539] );

d__3 := Vector( [ 11, 4.078] );

d__4 := Vector( [ 15.5, 2.079] );

d__5 := Vector( [ 19, 1.039] );

 

a := Vector( [ a__x, a__y] );

 

A__1:=R__1.a+d__1;

A__2:=R__2.a+d__2;

A__3:=R__3.a+d__3;

A__4:=R__4.a+d__4;

A__5:=R__5.a+d__5;

 

OO:=Vector([O__x,O__y]);

 

DA1:=A__2.A__2-A__1.A__1-2*(A__2-A__1).OO;

DA2:=A__3.A__3-A__1.A__1-2*(A__3-A__1).OO;

DA3:=A__4.A__4-A__1.A__1-2*(A__4-A__1).OO;

DA4:=A__5.A__5-A__1.A__1-2*(A__5-A__1).OO;

 

fsolve({DA1,DA2,DA3,DA4},{a__x,a__y,O__x,O__y});

Thanks for any tips you may be able to offer

 

How do I plot the following equations in Maple ?:

I already tried this: 

 

According to the given solution the plot should look like that: 

I think I have to tell maple that the function is defined from R^2 -> R, but I don't know how to do this. 

Thanks in advance for your kind help.

 

to plot procedure...

November 16 2014 taro 120

Hello people in mapleprimes,

 

I want to draw a graph of a procedure.

 

filter:=x->if x<10 then 1-x/10 else 0 fi;

plot('filter(x)',x=0..20);

 

works well. But, I don't know why it is needed for filter(x) is wrapped with foward quotte ' .

I changed that quote to back quote ` but, in this case the result hadn't appeared.

And, without the foward quote ', error appears.

And, even if I wrapped x with ' as in plot('filter(x)','x' =0..20),

a graph appeared properly, though I cannot understand why wrapped x, 'x' is right.

 

Please teach me the logic of the above code.

Best wishes.

 

taro yamada

 

How to solve this inequality?...

November 16 2014 _zgj 80

solve(a/(x+1)>1,x)

When I type this command and run it,It returns nothing but this warning

"Warning, solutions may have been lost"

How can I get the correct solution using Maple 18

AoA. How are you hope you will be fine. Sir the following matrix have been given

A := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 2, (2, 1) = -1, (2, 2) = 2});

B := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = -2, (2, 2) = 3});

C := Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0});

I want to write M by M matrix using the above matrices like this

P:=[[[A,B,B,...,B],[C,A,B,...,B],[C,C,A,...,B],[.,.,.,...,B],[C,C,C,...,A]]]

PhD (Scholar)
Department of Mathematics

AoA... I want to plot the following functions

f(x)=sin(x)

g(x)=sin(x)-x+x^2

h(x)=cos(x)-sin(x)

I(x)=exp(x)-x

J(x)=sin(x)+exp(x)

in one coordinate having the line style and legend like attached file.

1-s2.0-S0377042714003331-main.pdf

PhD (Scholar)
Department of Mathematics

After I do

restart;
plot(cos);

Now I right-click on the plot, and from the menu change the "line" to "dashed" style, so the plot becomes like this:

Now I would like to obtain the Maple plot command that would have generated the above plot, so I can use the command later in my script.  I could not find a menu option to show the Maple command.

Maple 18.02 on windows 7

I want to get the result of multi-matrix multiply like followed below,

but error "final value in for loop must be numeric or character"

(*n is arbitrary and B[1],B[2],...,B[n] have been obtained*)

A:=LinearAlgebra:-IdentityMatrix(n);
#using the multiplication operation of matrix
for i from 1 to n do
   A:=LinearAlgebra:-Multiply(A,B[i]);
od:

return A

help me 

thanks

Hello

I have a loop with the do structure but there is an error in the loop .

how can I continue the loop by error or disregard it?

y(t) = _C1*exp(-1.*t)*sin(.57736*t)+_C2*exp(-1.*t)*cos(.57736*t)

The answer i got for a DE raised in mapleprime is given above.

What command do i write now to get a plot of the same?

Ramakrishnan V

Hey, how is can i see all the steps in maple? I would specially like to know it for differential equations.

For example we could use this one:

dl := 3*(diff(y(t), t, t))+6*(diff(y(t), t))+4*y(t) = 0 

 

restart:
tmp:=Vector(
[
1+(-s[2]-s[4]+2*w[1]/(1+1/exp(mu[p]))^2+(2*(-w[1]+1))/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3+(-s[2]+s[3])*s[1]^2-s[2]*s[1],

(s[2]+s[4]-2*w[1]/(1+1/exp(mu[p]))^2-(2*(-w[1]+1))/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3
]
);

tmp := Vector(2, {(1) = 1+(-s[2]-s[4]+2*w[1]/(1+1/exp(mu[p]))^2+(-2*w[1]+2)/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3+(-s[2]+s[3])*s[1]^2-s[2]*s[1], (2) = (s[2]+s[4]-2*w[1]/(1+1/exp(mu[p]))^2-(-2*w[1]+2)/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3})

(1)

rule3:=w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2 = s[3];

w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2 = s[3]

(2)

applyrule(rule3,tmp[1]);

1+(-s[2]-s[4]+2*w[1]/(1+1/exp(mu[p]))^2+2*(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2)*s[1]^3+(-s[2]+s[3])*s[1]^2-s[2]*s[1]

(3)

 

``

 

Download problem.mw

 

This is part of a large simplifcation where lots of terms are being substituted. In two of those terms, it did not simplify as we would expect.

I think the main thing is trying to find a way to factor out the "2".

 

I could do this

> rule3:=w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2 = s[3];
>rule3:=2*rule3;

> rule3ne:=-(w[1]/(1+1/exp(mu[p]))^2+(-w[1]+1)/(1+1/(exp(mu[p])*exp(eta[p2])))^2) = -s[3];
> rule3ne:=2*rule3ne;

> applyrule(rule3,tmp[1]);
> applyrule(rule3ne,tmp[2]);

For this example, this works.

But I hope for a more generic approach.

 

Thanks,

 

casper

 

 

 

Hello, Im trying to do a jocobian

http://www.maplesoft.com/support/help/Maple/view.aspx?path=VectorCalculus/Jacobian

but when I try the example code

jacobian([rcos(t), rsin(t), r^2*t], [r, t])

 

i only get the output as 

 

jacobian([rcos(t), rsin(t), RandomMatrix(4, 4*density = .75, outputoptions = [shape = tringular*lowe])^2*t], [RandomMatrix(4, 4*density = .75, outputoptions = [shape = tringular*lowe]), t])

 

I want the output as a matrix as in the example url.

Thanks

a:=[1,2,3]:

b:=[1,2,3]:

evalb(a=b)    #The result is true

c:=Array([1,2,3]):

d:=Array([1,2,3]):

evalb(c=d)    #The result is false

This is Why?

I have the following system of non-linear equations and want to find their solutions experimenting with my parameters. I also want to restrict the solutions to be non-negative. I have done the following, but i am sure it exist a more efficient way. Can somone help on this? 

 

eqns := [A = (gr_c+delta)*kh^(1-alpha)/sav_rate, theta = Rk*(Rh-Rk)/(gamma*((Rh-Rk)^2+sigma^2)), theta = 1*1+kh, Rk = 1+rk-delta, Rh = 1+rh-delta, rk = A*alpha*kh^(alpha-1), rh = A*(1-alpha)*kh^alpha, sigma = sigmay/theta, varrho = Rap^((eps-1)*eps/(1-gamma)), Rap = Rk^(1-gamma)+(1-gamma)*Rk^(-gamma)*theta*(Rh-Rk)-.5*Rk^(-gamma-1)*gamma*(1-gamma)*theta^2*((Rh-Rk)^2+sigma^2), R = Rk+theta*(Rh-Rk), beta = ((1+gr_c)/R)^(1/eps)/varrho];
print(`output redirected...`); # input placeholder
[
[
[
[
[ (1 - alpha)
[ (gr_c + delta) kh
[A = ----------------------------,
[ sav_rate
[

Rk (Rh - Rk)
theta = ---------------------------, theta = 1 + kh,
/ 2 2\
gamma \(Rh - Rk) + sigma /

Rk = 1 + rk - delta, Rh = 1 + rh - delta,

(alpha - 1) alpha
rk = A alpha kh , rh = A (1 - alpha) kh ,

/(eps - 1) eps\
|-------------|
sigmay \ 1 - gamma /
sigma = ------, varrho = Rap , Rap =
theta

(1 - gamma) (-gamma)
Rk + (1 - gamma) Rk theta (Rh - Rk) - 0.5

(-gamma - 1) 2 / 2 2\
Rk gamma (1 - gamma) theta \(Rh - Rk) + sigma /,

/ 1 \]
|---|]
\eps/]
/1 + gr_c\ ]
|--------| ]
\ R / ]
R = Rk + theta (Rh - Rk), beta = ---------------]
varrho ]
]
vals := [alpha = .36, delta = 0.6e-1, sigmay = sqrt(0.313e-1), gamma = 3, eps = .5, gr_c = 0.2e-1, sav_rate = .23];
eval(eqns, vals);
print(`output redirected...`); # input placeholder
[
[
[
[ 0.64 Rk (Rh - Rk)
[A = 0.3478260870 kh , theta = -----------------------,
[ / 2 2\
[ 3 \(Rh - Rk) + sigma /

0.36 A
theta = 1 + kh, Rk = 0.94 + rk, Rh = 0.94 + rh, rk = ------,
0.64
kh

0.36 0.1769180601
rh = 0.64 A kh , sigma = ------------,
theta

0.1250000000
varrho = Rap ,

1 2 theta (Rh - Rk)
Rap = --- - -----------------
2 3
Rk Rk

2 / 2 2\
3.0 theta \(Rh - Rk) + sigma /
+ --------------------------------, R = Rk + theta (Rh - Rk),
4
Rk

2.000000000]
/1\ ]
1.0404 |-| ]
\R/ ]
beta = ---------------------]
varrho ]
]
eqns := [A = .3478260870*kh^.64, theta = (1/3)*Rk*(Rh-Rk)/((Rh-Rk)^2+sigma^2), theta = 1+kh, Rk = .94+rk, Rh = .94+rh, rk = .36*A/kh^.64, rh = .64*A*kh^.36, sigma = .1769180601/theta, varrho = Rap^.1250000000, Rap = 1/Rk^2-2*theta*(Rh-Rk)/Rk^3+3.0*theta^2*((Rh-Rk)^2+sigma^2)/Rk^4, R = Rk+theta*(Rh-Rk), beta = 1.0404*(1/R)^2.000000000/varrho];
print(`output redirected...`); # input placeholder
[
[
[
[ 0.64 Rk (Rh - Rk)
[A = 0.3478260870 kh , theta = -----------------------,
[ / 2 2\
[ 3 \(Rh - Rk) + sigma /

0.36 A
theta = 1 + kh, Rk = 0.94 + rk, Rh = 0.94 + rh, rk = ------,
0.64
kh

0.36 0.1769180601
rh = 0.64 A kh , sigma = ------------,
theta

0.1250000000
varrho = Rap ,

1 2 theta (Rh - Rk)
Rap = --- - -----------------
2 3
Rk Rk

2 / 2 2\
3.0 theta \(Rh - Rk) + sigma /
+ --------------------------------, R = Rk + theta (Rh - Rk),
4
Rk

2.000000000]
/1\ ]
1.0404 |-| ]
\R/ ]
beta = ---------------------]
varrho ]
]

solve(eqns, [Rk, Rh, varrho, Rap, beta, R, A, sigma, theta, rk, rh, kh]);

3 4 5 6 7 8 9 Last Page 5 of 1082