Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hi,

I try to solve this equation using pdsolve but there is no results.
restart:
with(PDEtools):
with(plots):

Eq:=diff(u(t,x), t$2) =diff(u(t,x),x$2)+sin(u(t,x));

pdsolve(Eq);

Thank you for your help.

 

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?

 

 

 

the sequence is non-decreasing up to some point after which it is non-increasing. Note that i can be 1 or n. A constant sequence is considered to be unimodal.

Examples of unimodal lists:

[1, 1, 1, 1, 1],
[1, 2, 2, 3, 4, 5, 5, 5],
[5, 5, 4, 4, 3, 3, 1],
[1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1],
[1, 2, 2, 3, 3, 3, 4, 4, 2, 2, 1, 1, 1]

 

Examples of lists that are not unimodal:

[1, 0, 1, 0],
[1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1],
[1, 1, 2, 2, 3, 4, 5, 2, 2, 6, 4, 2, 2, 1, 0]

 

i don't have a clue

Hi MaplePrime-ers,

I'm using the following piece of code to (i) solve the system of symbolically, so I can (ii) evaluate equations quickly at many points of time.  This works quite well for 4 defined values, but I'm having problems adding a 5th defined value.  Specifically, solve leaves the "solution may be lost" message after taking forever.  As the symbolic solution will be run mulitple times by a optimziation algorithm, I'd ideally like to get the solve time under 2 minutes.  I've attached both executed worksheets.  Is there anything I can do to have solve work as I intend?

This first code snippet achieves what I would like to do Series_noGear.mw:

 

#Interconnection Equations
eq2[1] := FD_T + EM2_T = 0;
eq2[2] := ICE_T + GEN_T = 0;
eq2[3] := EM2_A + GEN_A + BAT_A = 0;
eq2[4] := -FD_W + EM2_W = 0;
eq2[5] := -ICE_W + GEN_W = 0;
eq2[6] := -EM2_V + GEN_V = 0;
eq2[7] := -EM2_V + BAT_V = 0;

#ICE
eq_c[1] := ICE_mdot_g= ICE_T * ICE_W;

#BAT
eq_c[2] := BAT_V = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c[3] := EM2_P = piecewise( EM2_T * EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c[4] := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;

eq_c[5] := GEN_P = piecewise(GEN_T * GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c[6] := GEN_A = GEN_P/GEN_V;

#assumptions
assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

termeqs := {eq_c[1],eq_c[2],eq_c[3],eq_c[4],eq_c[5],eq_c[6]};

sys_eqs2 := termeqs union convert(eq2,set);

drivers2:= {ICE_T,ICE_W,FD_T,FD_W};
symvarnames2:=select(type,indets(convert(sys_eqs2,list)),name);
notdrivers2:=symvarnames2 minus drivers2;

sol2:=solve(sys_eqs2,notdrivers2) assuming real;

symb_sol2:=unapply(sol2,[drivers2[]]);

symb_sol2(1,2,3,5);

#Enumerate (there will generally be about 40, not 3)

count := 0;
for i1 from 1 to 3 do
     for i2 from 1 to 3 do
          for i3 from 1 to 3 do
               for i4 from 1 to 3 do
                    count := count + 1;
                    solsol2(count) := symb_sol2(i1,i2,i3,i4);
               od; 
          od;
     od;
od;
count;

This second code snippet includes the changes in bold, which make solve take forever Series_addGear.mw:

#Interconnection Equations
eq2[1] := FD_T + EM2_T = 0;
eq2[2] := ICE_T + GBb_T = 0;
eq2[3] := EM2_A + GEN_A + BAT_A = 0;
eq2[4] := -FD_W + EM2_W = 0;
eq2[5] := -ICE_W + GBb_W = 0;
eq2[6] := -EM2_V + GEN_V = 0;
eq2[7] := -EM2_V + BAT_V = 0;
eq2[8] := GBa_T + GEN_T = 0;
eq2[9] := -GBa_W + GEN_W = 0;

#ICE
eq_c[1] := ICE_mdot_g= ICE_T * ICE_W;

#BAT
eq_c[2] := BAT_V = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c[3] := EM2_P = piecewise( EM2_T * EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c[4] := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;

eq_c[5] := GEN_P = piecewise(GEN_T * GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c[6] := GEN_A = GEN_P/GEN_V;

#GB
eq_c[7] := GBb_T = -1/GB_R * GBa_T;
eq_c[8] := GBb_W = GB_R * GBa_W;

assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);
assume(GB_R::nonnegative);

termeqs := {eq_c[1],eq_c[2],eq_c[3],eq_c[4],eq_c[5],eq_c[6],eq_c[7],eq_c[8]};

sys_eqs2 := termeqs union convert(eq2,set);

drivers2:= {GB_R,ICE_T,ICE_W,FD_T,FD_W};
symvarnames2:=select(type,indets(convert(sys_eqs2,list)),name);
notdrivers2:=symvarnames2 minus drivers2;

sol2:=solve(sys_eqs2,notdrivers2) assuming real;

symb_sol2:=unapply(sol2,[drivers2[]]);

 

Does assume make solve work faster, or just complicate things?  Any help is greatly appreciated!

 

Series_addGear.mw

Series_noGear.mw

Hello there

I have to plot wavelet frame functions (framelet) using Maple. Can I send you the figure and help me to learn how to plot it and send me the code. I will pay for you if you can do it. 

Thank you

hi,i can not upload anything to mapleprimes.com every time i want to upload a file, i face error generating page . what should i do ?! 

Hi,

Maybe someone can give me a nice answer without Maple.

I am given a fourier series:
ln|cosx|=Co - sum( (-1)^k/k * cos2kx,k=1..infinity)
and am asked what this tells me about the chevychev series for ln(u).

 

Thanks

Hi, this question is for Samir Kahn or other maplesoft staff.

Is there a way to use modelica biochem or any other chemical path library into maplesim? Do you plan to integrate this library in future versions of maplesim? Wolfram systemModeler has this library already integrated as does symbiology in matlab. Mr Kahn, I hope that your background in chemical engineering help you push for this new development in maplesim and help this product be even better than the competion. thank you and let me know as soon as possible.

juan

 

Hello,

 

Is it possible to use Maple 15 Student Edition with the same license information and purchase code both on Windows and Ubuntu?

I did a few Windows reinstalls (guess about 3) hence I used the same purchase code to activate the license that many times. Today I tried installing and using Maple 15 on Ubuntu 12.04.3 LTS 32-bit and to my dismay the license manager said, "Not enough activations left on this account." Furthermore, I have exhausted my download links and would like to know how many times Maple 15 can be activated and if the download links can be refreshed?

 

Thanks

I have found the value of t1 and T, but I am unsure of the value. t1 and T in this case is the initialization time at the which the inventory level to zero in Reaches
warehouse. whether possible negative value? is there a lack of proper writing of parameters in this case? so that the output of t1 and T is negative? thanks a lot

> TC := (p*A*((lambda-sigma)*(exp(lambda*t2)-1)+lambda*(exp((lambda-sigma)*T)-exp((lambda-sigma)*t2)))/(lambda*(lambda-sigma))-Ca-A*exp(lambda*t1)*((beta*a2+b2)*(exp(beta*t1)-1)/beta^2-(lambda*a2-b2)*(1-exp(-lambda*t1))/lambda^2)/(beta+lambda)+A*exp(lambda*t1)*b2*t1/(lambda*beta)-W*((alpha*a1+b1)*(1-exp(-alpha*t1))-alpha*b1*t1*exp(-alpha*t1))/alpha^2+A*(exp(lambda*t2)*((a1+b1*t2)*lambda*alpha+b1*(lambda-alpha))-exp(lambda*t1)*(b1*(alpha^2-lambda^2*exp((lambda+alpha)*(t2-t1)))-(a1+b1*t1)*lambda*alpha*(alpha+lambda*exp((lambda+alpha)*(t2-t1))))/(lambda+alpha))/(lambda^2*alpha^2)+Cs*A*exp((lambda-sigma)*t2)*((T-t2)*(lambda-sigma)-exp((T-t2)*(lambda-sigma))+1)/(lambda-sigma)^2-L*A*((exp(lambda*T)-exp(lambda*t2))/lambda-(exp((lambda-sigma)*T)-exp((lambda-sigma)*t2))/(lambda-sigma))-C*(A*(exp((beta+lambda)*t1)-1)/(beta+lambda)+W+A*(exp((lambda-sigma)*T)-exp((lambda-sigma)*t2))/(lambda-sigma)))/T;
>
> TC2 := subs(t2 = (ln(W*(lambda+alpha)/A)+(lambda+alpha)*t1)/(lambda+alpha), TC);
>
> x1 := diff(TC2, t1) = 0;
>
> x2 := diff(TC2, T) = 0;
>
> x3 := evalf(simplify(lhs(eval(subs(A = 200, lambda = 0.3, a2 = 2.4, b2 = 0.01, a1 = 0.9, b1 = 0.01, alpha = 0.01, beta = 0.04, W = 100, Ca = 90, L = 7, C = 10, p = 15, Cs = 3, sigma = 0.25, x1)))));
>
> x4 := evalf(simplify(lhs(eval(subs(A = 200, lambda = 0.3, a2 = 2.4, b2 = 0.01, a1 = 0.9, b1 = 0.01, alpha = 0.01, beta = 0.04, W = 100, Ca = 90, L = 7, C = 10, p = 15, Cs = 3, sigma = 0.25, x2)))));

> x5 := fsolve({x3, x4}, {T, t1});
          x5 := {T = -15.72808468, t1 = -12.55374671}

You have clickable calc. Today I saw in your email that you have clickable physic but in french. Do you have it in english too>?

Thank you

manolo

Hi

I'm using Maple 17 on Windows 8 (64-bit).

I have noticed that when I use the 'spacecurve' command and try to display it with the 'display' command, nothing shows up. I made sure that I used 'with(plots)' and 'with(plottools)', still nothing. However 'plot3d' works fine. I think it has something to do with the version of Java I'm using but I don't know what. Any help is welcome, thx

Specifications of my laptop:

Graphics: NVIDIA Geforce GT 740m

Processor: Intel(R) Core(TM) i7-3630QM (2.40GHz)

Ram: 6,00 GB

OS: Windows 8.1

Dear all,

I am trying to use Maple for Finite Element calculations. I have a 2d setup with linear basis functions and a 2d gaussian kernel that can rotate with respect to the axes. Attached please find the work sheet I am using.

Basis_function:

B := (x1,y1,x,y) -> max(0, 1-abs(x-x1))*max(0, 1-abs(y-y1))

transmissibility function:

t_hat:= (x1,y1,x,y) -> A*exp(-a*(x-x1)^2-2*b*(x-x1)*(y-y1)-c*(y-y1)^2)

where A  and a,b,c are positive constants. a,b,c are calculated based on an angle phi and the two variances of the gaussian function.

I want to calculate the following function for different points (x1,y1) , (x2,y2):

trans := (x1, y1, x2, y2) -> int(int(B(x1, y1, xz, yz)*(int(int(t_hat(xz, yz, xp, yp)*(B(x2, y2, xz, yz)-B(x2, y2, xp, yp)), xp = x2-10*sigma1 .. x2+10*sigma1), yp = y2-10*sigma2 .. y2+10*sigma2)), xz = x1-hx .. x1+hx), yz = y1-hy .. y1+hy);

this integral in the form that is in the work sheet, works well for phi=0 and the results are what I want (numbers that go to zero as we move points 1 and 2 away from each other). for other values for phi it either gives an error (too many levels of recursion) or it returns expressions that seem unreasonable when I evaluate them (they don't go to zero).

for example, it doesn't work for phi = 0.5 at all. for phi = Pi/4 it will calculate some expression,

but as you move away from a point (e.g. trans(0,0,100,100)) the value does not become smaller than a certain value, but they should go to zero.

It seems that what I am trying to do is very sensitive to a,b,c, but actually it shouldn't be so different. I like to avoid exact integration, and just get a number, but I have no idea how to do this numerically. and I don't know how to write the problem in a way that would work for every angle phi.

any ideas?

thanks in advace,2d_maple_primes.mw

with(plots); with(LinearAlgebra); with(ArrayTools)

``

Transmissibility function specifications

alpha := 1;

1

 

4

 

1

 

(1/4)*Pi

(1)

 

a := (1/2)*(cos(phi)/sigma1)^2+(1/2)*(sin(phi)/sigma2)^2;

17/64

 

15/64

 

17/64

 

A = (1/8)/Pi

(2)

 

 

Transmissibility*Kernel

t_hat := proc (x1, y1, x, y) options operator, arrow; A*exp(-a*(x-x1)^2-2*b*(x-x1)*(y-y1)-c*(y-y1)^2) end proc

proc (x1, y1, x, y) options operator, arrow; A*exp(-a*(x-x1)^2-2*b*(x-x1)*(y-y1)-c*(y-y1)^2) end proc

(3)

B := proc (a, b, x, y) options operator, arrow; max(0, 1-abs(x-a))*max(0, 1-abs(y-b)) end proc

proc (a, b, x, y) options operator, arrow; max(0, 1-abs(x-a))*max(0, 1-abs(y-b)) end proc

(4)

trans := proc (x1, y1, x2, y2) options operator, arrow; int(int(B(x1, y1, xz, yz)*(int(int(t_hat(xz, yz, xp, yp)*(B(x2, y2, xz, yz)-B(x2, y2, xp, yp)), xp = x2-10*sigma1 .. x2+10*sigma1), yp = y2-10*sigma2 .. y2+10*sigma2)), xz = x1-hx .. x1+hx), yz = y1-hy .. y1+hy) end proc

proc (x1, y1, x2, y2) options operator, arrow; int(int(B(x1, y1, xz, yz)*(int(int(t_hat(xz, yz, xp, yp)*(B(x2, y2, xz, yz)-B(x2, y2, xp, yp)), xp = x2-10*sigma1 .. x2+10*sigma1), yp = y2-10*sigma2 .. y2+10*sigma2)), xz = x1-hx .. x1+hx), yz = y1-hy .. y1+hy) end proc

(5)

 

#####testing here######

#for phi == 0 the results are what i want, numbers that go to zero as the points go far from each other. for phi != 0 trans returns an expression and the evaluation of that expression doesn't go to zero as we move the points far apart.

NULL

trans(0, 0, 0, 1)

trans(0, 0, 1, 0)

trans(0, 0, 5, 5)

``

This should be zero for any angle

trans(0, 0, 50, 50)

 

 

 

``


Download 2d_maple_primes.mw

Hi,

I open a new subject about Fredholm Integral equation. My code work correctly.

But, I need some modification to get a nice display of the matrix found using
MatA,Vectb := GenerateMatrix(convert(sys3,list),Sol_phi);

such as Sol_phi is my solution that I want to find.

I introduced two function alpha1 and alpha2 in the code  see Equation (9) can I write all the coeficient of my matrix using the two function alpha[1] and alpha[2], it's better to see and read the matrix form.

 

Fred.mw

I have a complicated function that I call on a elements of a list. This function inside calls various other functions and in particular fsolve, which is not thread safe. In order to speed things up I tried using Grid:-Map, but have found a slight drop in performance.

So say a run with map takes 31 seconds, a run with Grid:-Map will take 32 seconds. By looking at the cpu activity, I can tell that only a single core is used at any one time (this is also evident from timing). By looking at the processes, I do see "mserver -gridnode 1/4", etc. present however, so new mserves are certainly spawned - they are just just not used concurrently.

Grid:-NumNodes() gives 4 for my CPU.

Any ideas how to force my code to run on all four nodes??

I am on ubuntu 12.04 x86_64.

thanks.

 ** EDIT **

In case someone finds this useful. Here is a quick-hack that fixes this problem for me.

Look at the current implementation of Grid:-Map with

showstat(Grid:-Map):

Define a new function called say hackMap that is identical to Grid:-Map, except, change the second line from this

     var := `union`(`union`(map(proc (x) op(0,x) end proc,indets(f,function)),indets(f,name)),{'`grid/mapcmd`'});

to this:

     var := {anames('user'), '`grid/mapcmd`'};

now use hackMap as you would Grid:-Map.

It basically forces maple to copy all the 'user' variables over to the new processes. On a machine with 4 nodes i get a ~4 seedup with my particular code.

NOTE: I am not certain that there aren't some side effects as I dont' know all the code behind the scenes, but I seem to get correct results with my particular code.

First 263 264 265 266 267 268 269 Last Page 265 of 361