MaplePrimes Questions

 

please write a program on matlab or maple for this dde

y'(x)=-y(x-pi/2)       0<x<=10

y(x)=sin(x)       x<=0

tau=pi/2

 

IT IS URGENT PLEASE

given a scalar field function f(x,y,z), how to plot it in maple?

I can't find a suitable command, if I missed, please tell me.

thank you for any advice.

i try to calculate function f on laplace and want to know the way tha how to be it calculated

what commands show it?

Hi all,

 

I wonder if any of you guys can figure out why this integral is taking more than 2 hours to return a result??

I had similar problems in the past that were fixed creating a procedure, changing the solver and in case of trigonometric functions, changing the argument from float to rational number. 

Here it goes:Meijer_question.mw

restart

 

``

 

ms := (1.141448075+9.645873109*10^(-11)*I)*(MeijerG([[], []], [[1/4, 1/4], [1/2, 0]], .3956862293*(-.70*x+1)^4)+(2.148399968-2.148399963*I)*MeijerG([[], []], [[1/4], [1/2, 1/4, 0]], -.3956862293*(-.70*x+1)^4)+(-12.48809431-3.188863063*10^(-9)*I)*MeijerG([[], []], [[0], [1/2, 1/4, 1/4]], -.3956862293*(-.70*x+1)^4)+(4.061500400*10^(-10)-8.649913391*I)*MeijerG([[], []], [[1/2], [1/4, 1/4, 0]], -.3956862293*(-.70*x+1)^4));

b := .7;

``

NULL

"H3p:=proc(ms,b) local Hcub;  Hcub := evalf(Int(diff((diff(ms, x))*(int((-x*b+1)*(int((ms')^2, x = 0 .. x)), x = 1 .. x)), x)*ms, x=0..1,method = _d01ajc)): return Hcub; end proc:   "

``

 

st := time(); ``*H3p(ms, b); time()-st

``


Thanks!

Download Meijer_question.mw

Hi, I'm currently from Mathematica and it starts to disappouint me because it cannot do what I can.

Can somebody try to calculate undefinite integral in Maple for x variable. a and b are parameters.

exp(a*x+b*x2)*erf(x)2

If Maple can do that then I would switch to Maple comunity.

Thanks,

Tim

In Maple 2015, on windows 8.1 64-bit the command
series(2*x*(x-y)/y, y = 0, 3);
gives

which is incorrect. The answer is


You can notice the minus sign in front the the -2x is incorrectly typeset, which makes me wonder if it's a bug in the typsetting program and not series itself.

Please fix asap

Hey there,

I've a numerical solved system of differential equations, which depend on one argument and one index. I can solve it, but when I try plot it I have this error: Error, (in plot) two lists or Vectors of numerical values expected.

Could anyone help me figure out what I'm doing wrong?

 

> restart;
> A := 115.1558549; B := .3050464658; n := 3; f0 := 0.5e-4;
               
>f:=theta->f0*(cos(arcsin(sin(theta)/n)))^2;
  I0:=Ir(z)+sum(Is[k](z),k=1..20);

> alpha := [0, 1, 2, 3, 4, 5, 6];

Theta := [3*Pi*(1/180), 6*Pi*(1/180), 9*Pi*(1/180), 12*Pi*(1/180), 15*Pi*(1/180), 18*Pi*(1/180), 21*Pi*(1/180), 24*Pi*(1/180), 27*Pi*(1/180), 30*Pi*(1/180), 33*Pi*(1/180), 36*Pi*(1/180), 39*Pi*(1/180), 42*Pi*(1/180), 45*Pi*(1/180), 48*Pi*(1/180), 51*Pi*(1/180), 54*Pi*(1/180), 57*Pi*(1/180), 60*Pi*(1/180)];

>G:= theta->A*sin(theta)*cos(2*arcsin((sin(theta)/n)))/((1+sin(theta)^2/B^2)*cos(arcsin(sin(theta)/n)));

>for j from 1 to 7 do
d1 := diff(Ir(z), z) = -sum(G(Theta[k])*Ir(z)*Is[k](z)/I0,k=1..20)-alpha[j]*Ir(z)-sum(f(Theta[k])*Ir(z),k=1..20):
d2 := diff(Is[1](z), z) = G(Theta[1])*Ir(z)*Is[1](z)/I0-alpha[j]*Is[1](z)+f(Theta[1])*Ir(z):
d3 := diff(Is[2](z), z) = G(Theta[2])*Ir(z)*Is[2](z)/I0-alpha[j]*Is[2](z)+f(Theta[2])*Ir(z):
d4 := diff(Is[3](z), z) = G(Theta[3])*Ir(z)*Is[3](z)/I0-alpha[j]*Is[3](z)+f(Theta[3])*Ir(z):
d5 := diff(Is[4](z), z) = G(Theta[4])*Ir(z)*Is[4](z)/I0-alpha[j]*Is[4](z)+f(Theta[4])*Ir(z):
d6 := diff(Is[5](z), z) = G(Theta[5])*Ir(z)*Is[5](z)/I0-alpha[j]*Is[5](z)+f(Theta[5])*Ir(z):
d7 := diff(Is[6](z), z) = G(Theta[6])*Ir(z)*Is[6](z)/I0-alpha[j]*Is[6](z)+f(Theta[6])*Ir(z):
d8 := diff(Is[7](z), z) = G(Theta[7])*Ir(z)*Is[7](z)/I0-alpha[j]*Is[7](z)+f(Theta[7])*Ir(z):
d9 := diff(Is[8](z), z) = G(Theta[8])*Ir(z)*Is[8](z)/I0-alpha[j]*Is[8](z)+f(Theta[8])*Ir(z):
d10 := diff(Is[9](z), z) = G(Theta[9])*Ir(z)*Is[9](z)/I0-alpha[j]*Is[9](z)+f(Theta[9])*Ir(z):
d11 := diff(Is[10](z), z) = G(Theta[10])*Ir(z)*Is[10](z)/I0-alpha[j]*Is[10](z)+f(Theta[10])*Ir(z):
d12 := diff(Is[11](z), z) = G(Theta[11])*Ir(z)*Is[11](z)/I0-alpha[j]*Is[11](z)+f(Theta[11])*Ir(z):
d13 := diff(Is[12](z), z) = G(Theta[12])*Ir(z)*Is[12](z)/I0-alpha[j]*Is[12](z)+f(Theta[12])*Ir(z):
d14 := diff(Is[13](z), z) = G(Theta[13])*Ir(z)*Is[13](z)/I0-alpha[j]*Is[13](z)+f(Theta[13])*Ir(z):
d15 := diff(Is[14](z), z) = G(Theta[14])*Ir(z)*Is[14](z)/I0-alpha[j]*Is[14](z)+f(Theta[14])*Ir(z):
d16 := diff(Is[15](z), z) = G(Theta[15])*Ir(z)*Is[15](z)/I0-alpha[j]*Is[15](z)+f(Theta[15])*Ir(z):
d17 := diff(Is[16](z), z) = G(Theta[16])*Ir(z)*Is[16](z)/I0-alpha[j]*Is[16](z)+f(Theta[16])*Ir(z):
d18 := diff(Is[17](z), z) = G(Theta[17])*Ir(z)*Is[17](z)/I0-alpha[j]*Is[17](z)+f(Theta[17])*Ir(z):
d19 := diff(Is[18](z), z) = G(Theta[18])*Ir(z)*Is[18](z)/I0-alpha[j]*Is[18](z)+f(Theta[18])*Ir(z):
d20 := diff(Is[19](z), z) = G(Theta[19])*Ir(z)*Is[19](z)/I0-alpha[j]*Is[19](z)+f(Theta[19])*Ir(z):
d21 := diff(Is[20](z), z) = G(Theta[20])*Ir(z)*Is[20](z)/I0-alpha[j]*Is[20](z)+f(Theta[20])*Ir(z):
dsys := {d1, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d2, d20, d21, d3, d4, d5, d6, d7, d8, d9}:
dSol[j] := dsolve({op(dsys), Ir(0) = 1, Is[1](0) = 0.1e-1, Is[2](0) = 0.1e-1, Is[3](0) = 0.1e-1, Is[4](0) = 0.1e-1, Is[5](0) = 0.1e-1, Is[6](0) = 0.1e-1, Is[7](0) = 0.1e-1, Is[8](0) = 0.1e-1, Is[9](0) = 0.1e-1, Is[10](0) = 0.1e-1, Is[11](0) = 0.1e-1, Is[12](0) = 0.1e-1, Is[13](0) = 0.1e-1, Is[14](0) = 0.1e-1, Is[15](0) = 0.1e-1, Is[16](0) = 0.1e-1, Is[17](0) = 0.1e-1, Is[18](0) = 0.1e-1, Is[19](0) = 0.1e-1, Is[20](0) = 0.1e-1}, [Ir(z), Is[1](z), Is[2](z), Is[3](z), Is[4](z), Is[5](z), Is[6](z), Is[7](z), Is[8](z), Is[9](z), Is[10](z), Is[11](z), Is[12](z), Is[13](z), Is[14](z), Is[15](z), Is[16](z), Is[17](z), Is[18](z), Is[19](z), Is[20](z)], numeric);
end do:


>for j from 1 to 7 do
dSol[j](0.4);
as:='as':
for l from 1 to 20 do
as[l]:=[Theta[l],rhs(dSol[j](0.4)[2+l])];
od:
plo[j]:=convert(as,listlist);
od:


>plot(plo[2],plo[1]);
Error, (in plot) two lists or Vectors of numerical values expected

Hi, and thanks in advance for your help.

My problem starts with an arbitrary function, f, which has two arguments:

f(sqrt(m/(m+1))*(x+1/(2*sqrt(m))), sqrt(m/(m+1))*(y-1/(2*sqrt(m))));

In the problem I'm working on, m is quite large, so both the first and second arguments are more or less equal to x or y, respectively. The step I'm having trouble with is trying to find an expression for the Taylor expansion of this arbitrary function about the point (x,y) itself. My best bet, I think, is to try and use the mtaylor command. I've tried the following:

mtaylor(f(sqrt(m/(m+1))*(x+1/(2*sqrt(m))), sqrt(m/(m+1))*(y-1/(2*sqrt(m)))), [x = x, y = y], 3);

I had hoped that [x=x,y=y] would tell Maple to expand the arbitrary function about the point (x,y), since the help file on the mtaylor function states that the left hand side of both equalities needs to be the variable, and the right hand side the expansion point. I was sure this would not work (given that the left hand sides are not the variables in this case, but rather the more complicated expressions involving the square roots are). I then tried the following:

mtaylor(f(sqrt(m/(m+1))*(x+1/(2*sqrt(m))), sqrt(m/(m+1))*(y-1/(2*sqrt(m)))), [sqrt(m/(m+1))*(x+1/(2*sqrt(m))) = x, sqrt(m/(m+1))*(y-1/(2*sqrt(m))) = y], 3);

This, however, spat back: Error, (in mtaylor) invalid 2nd argument (expansion point). I think my problem is arising because the x,y variables about which I want my expansion are themselves contained in the more complicated arguments given in the first equation.

If I can get this all to work correctly, I'm hoping to arrive at a Taylor expansion of:

f(sqrt(m/(m+1))*(x+1/(2*sqrt(m))), sqrt(m/(m+1))*(y-1/(2*sqrt(m))));

involving sums of terms which themselves contain factors of f, and it's derivatives, exaluated at the point (x,y), with all the m dependence sitting outside of the argument of the function f, contained either as part of the coefficients of the terms or the polynomial factors of the Taylor expansion.

I'm all out of ideas after having tried for a week to figure this out. Any help would be greatly appreciated! Please let me know if you need more clarity on the problem, and thanks again!

Hi Everyone,

I have a bunch polynomial systems of equations (all form zero-dimensional ideals, i.e. there is a finite number of complex solutions), and I would like to get a real solution for each of them, if available.

fsolve would be the tool to use. But it lead to some strange behaviour for me. Among some other inputs, the input

fsolve({81*x3^12+72*x3^10-614*x3^9+16*x3^8-384*x3^7+1884*x3^6+480*x3^4-2760*x3^3+1600, 81*x2*x3^11+72*x2*x3^9-452*x2*x3^8+16*x2*x3^7-240*x2*x3^6+980*x2*x3^5+32*x2*x3^4-144*x2*x3^3-800*x2*x3^2-220*x3^3+160*x2^2+480*x2+520, 81*x3^11+72*x3^9-452*x3^8+16*x3^7-240*x3^6+980*x3^5+32*x3^4-144*x3^3-800*x3^2+160*x1+160*x2+480},{x1, x2, x3});

somehow outputs itself, i.e.

fsolve({81*x3^12+72*x3^10-614*x3^9+16*x3^8-384*x3^7+1884*x3^6+480*x3^4-2760*x3^3+1600, 81*x2*x3^11+72*x2*x3^9-452*x2*x3^8+16*x2*x3^7-240*x2*x3^6+980*x2*x3^5+32*x2*x3^4-144*x2*x3^3-800*x2*x3^2-220*x3^3+160*x2^2+480*x2+520, 81*x3^11+72*x3^9-452*x3^8+16*x3^7-240*x3^6+980*x3^5+32*x3^4-144*x3^3-800*x3^2+160*x1+160*x2+480},{x1, x2, x3})

I know that this system has no real solutions, but only complex ones. But wouldn't the expected output then be just nothing (as e.g. "solve" does)?

I am confused by this output. Furthermore, how can I "check" with Maple if the output was a solution? By checking the type? There must be less hacky solutions. Thank you all in advance for your help.

Albert

PS.: When I add the keyword "complex" to the function call, then I receive a complex solution; hence, the syntax at least is correct (if someonw might have doubted that).

Hello everyoene, please i have a problem solving this delay differential equation:

y'(x)=cos(x)+y(y(x)-2)    0<x<=10

y(x)=1      x<=0

tau=x-y(x)+2

please i need the solution urgently

loock i have 3 models and a Matrix
>m3:=importmatrix("loslobos.txt");
>model[1]:=a*x;
>model[2]:=a^2*x+b;
>model[3]:=C-x^2+a;

so i apply a command named DataFit and it gives me 
>g:=Datafit(matrix,model[1]);

and that throws
         g:=[3,[a:=5],33];
so
         >g[1];
3
         >g[2];
5
         >g[3];
33
the variable that i care about is g[1] so every 3 models have differents g[1] so i need to pick the smallest g[1] and then use his model.
Example:=
>g:=Datafit(matrix,model[1]);
g:=[3,[a:=5],33];
>gg:=Datafit(matrix,model[2]);
gg:=[10,[a:=5,b:=10],44];
>G:=Datafit(matrix,model[3]);
G:=[1.1,[C:=5,a:=2],88];

then 

>plots:-display(plot(m3, style = point, symbol = diamond, symbolsize = 9), plot(eval("MODEL THAT SHOULD BE PLOT", THE G[2] OF THE MODEL), x = 0 .. 27, color = black));

The right one here would be 

>plots:-display(plot(m3, style = point, symbol = diamond, symbolsize = 9), plot(eval(model[3], G[2]), x = 0 .. 27, color = black));

so how do i select the model[3] for my plot? i knnow how the eval works so the problem here is to pick the right model please Help i hope that i isn't that Hard thnx
   

i need to find how many rows and how many columns has a matrix that i just imported so i don't have to use readstat so it will be more automatic.

m1 := ImportMatrix("Matrix1.txt");
F := readstat("rows of the matrix");
C := readstat("columns of the matrix)")

LAG := C-1;
LAGG := F-1

for a to LAG do
for v to F do
for i to C-a do
h := m1(v, i);
r := m1(v, i+a);
..
..
.
.
in mathlab we use 

a=load('BROOKER.dat'); 

[m,n]=size(a);

but in maple? please help

Hello all.

Need help. 

My project are too slow calculate integrals. What can i do to speed up numerical integration?

Thanks all.
MP_1.mw

Here my worksheet that at the end of it I have a problem with the dsolve when solving an ode system. and the error is 

Error, (in StringTools:-IsPrefix) second argument must be a string

I know that the dsolve has problem with bracket . Then how can I fix it or how can I change my codes.

 optimal.mwoptimal.mw

How can i solve the problem? (Error, (in f) division by zero)

 

restart;
f := proc (z, n) local x, i, k, j;
for i to n
do
if i = n then x[i] := trunc(z/10^(n-1))
else x[i] := trunc((`mod`(z, 10^i))/10^(i-1))
end if
end do;
printf("The number %d has the digits:", z);
x[n+1] := 0;
for k from n by -1 to 1
do
print(x[k]);
x[n+1] := x[n+1]+x[k]
end do;
printf("The checksum is:");
print(x[n+1]);
for j to n
do
if `mod`(z, x[j]) = 0 then printf("The number is divisible by: %d\n", x[j])
else printf("The number is not divisible by: %d\n", x[j])
end if
end do;
for j to n
do
if `mod`(x[n+1], x[j]) = 0 then printf("The sum is divisible by: %d\n", x[j])
else printf("The sum is not divisible by: %d\n", x[j])
end if
end do
end proc;

f(12305, 4)

Error, (in f) division by zero

First 1266 1267 1268 1269 1270 1271 1272 Last Page 1268 of 2430