pallav

40 Reputation

5 Badges

7 years, 351 days

MaplePrimes Activity


These are questions asked by pallav

How to find the coefficient of x, x^2,and xy from the following polynomial

 

F:-2*x+6*y+4*x^2+12*x*y-5*y^2

 

coeff(F, x) gives an answer 12*y+2 but I want it as 2 etc

coeff(F, x*y) gives an error 

Error, invalid input: coeff received x*y, which is not valid for its 2nd argument, x
 

I need the list of x and y separately of S[2] like the:

[.8098169753, 0.8098169753, .8098169753, .8098169753, .8098169753, .8098169753]

[1.339721710, 1.309892054, 1.282898312, 1.258277638, 1.235670705, 1.214793049]

 

 

restart; with(LinearAlgebra);
a := 2; b := .29; d := 1.85; for h from .5 by .1 to 1 do
eq1 := x*(-b*x^2-x+1);
eq2 := y*((a*x*x)/(b*y^2)-d-h*y);
S := solve({eq1, eq2}, {x, y});

I want to use for do loop and the print statement. print(h, AA) gives two columns left for h and right for AA separeted by comma. How to change this two column presentation so that I can get the sequence of h and sequence of AA. Note that print(h) and print(AA) gives two separate columns. But I want to convert print(h, AA).

 

for h from 0.01 by .1 to 5 do
AA := (1+h)/h^2;
print(h, AA) end do:

I have to vary two variables A & B. For a fixed A, if I vary B such that l1 and l2 is positive, then I need the min value of B for which ((l1>0) and (l2>0)) 

. In such a way I need the list of A & B.

restart; printlevel := 0 

for A  from .1 by .01 to 3 do  
 for B  from .1 by .01 to 3 do
l1:=(exp(B)-A)-1
l2:=(exp(B)-A/2)-1.5

end do

if ((l1>0) and (l2>0)) then print(A,min(B)) end if

I want to get rid of the unnecessary output lines after the evaluation of the following ocde

 

restart; with(linalg);
a := 2; b := .29; d := 1.85;
for h from .5 by .1 to 1 do
eq1 := x*(-b*x^2-x+1);
eq2 := y*((a*x*x)/(b*y^2)-d-h*y);
S := solve({eq1, eq2}, {x, y});
SS := solve(subs(S[3], {omega^4+(h*y+x)*omega^2+h^2*x-y}), {omega});
tau := simplify(subs(S[3], subs(SS[3], (b^2*h*y+a*x)/omega)))
end do

 

1 2 Page 1 of 2