Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

Hello everyone!

I want to generate an lower triangular matrix. Please see the attachment and help me. I am waiting your quick response. 

Help.mw

woud like to find H(x)

just for one of definition H(x) + H(y) = H(x+y), but it seems require to duplicate one more set of differential system

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: [{a(x), a(y)}, {b(x), b(y)}]

eq2a := a(x)*(diff(c(x), x))+b(x);
eq3a := a(x)*(diff(b(x), x))+c(x)*(diff(b(x), x));
eq4a := a(x)*(diff(c(x), x))+a(x)*(diff(b(x), x))+b(x);
eq2b := a(y)*(diff(c(y), y))+b(y);
eq3b := a(y)*(diff(b(y), y))+c(y)*(diff(b(y), y));
eq4b := a(y)*(diff(c(y), y))+a(y)*(diff(b(y), y))+b(y);
inis := diff(a(x),x)=H(a(x)), diff(b(x),x)=H(b(x)), diff(c(x),x)=H(c(x)), a(1) = b(1), b(1) = c(1), a(0) = b(0), b(0) = c(0);
inis := diff(a(x),x)=H(a(x)), diff(b(x),x)=H(b(x)), diff(c(x),x)=H(c(x));
inio := diff(a(y),y)=H(a(y)), diff(b(y),y)=H(b(y)), diff(c(y),y)=H(c(y)),H(a(x)) + H(b(x)) = H(a(x)+b(x));
sol := dsolve([eq2a=1, eq3a=exp(a), eq4a=0, eq2b=1, eq3b=exp(b), eq4b=0, inis, inio], [a(x), b(x), c(x), a(y), b(y), c(y), H(a(x)), H(b(x)), H(a(y)), H(b(y))]);

So, I have the following inputted into Maple 2015, but the plots are not displaying.  I've double checked the syntax, but I don't see anything wrong.  Any thoughts?  Thank you!

 

plot3d(cos(theta)^2, phi = 0 .. 2*Pi, theta = 0 .. Pi, axes = BOX, style = line, grid = [50, 50], view = [-1 .. 1, -1 .. 1, -1 .. 1], coords = spherical);

 

Trying to plot that here actually displays the plot, but it isn't showing up in my Maple worksheet.

hi

how pdsolve 2D couple  non linear differential equations which attached below?

thanks

2D.mw

PD1 := 12.6000000000000*(diff(U(x, theta), x, x, x, x))-7500*(diff(U(x, theta), x, x))+10.2112755389544*(diff(U(x, theta), x, x, theta, theta))+7.22165554279476*(diff(V(x, theta), x, x, x, theta))-3730.19397871630*(diff(V(x, theta), x, theta))+4.57316679658261*(diff(V(x, theta), x, theta, theta, theta))+36.0000000000000*(diff(W(x, theta), x, x, x))-9375.00*(diff(W(x, theta), x))-15.6731205946742*(diff(W(x, theta), x, theta, theta))-1947.26649812618*(diff(U(x, theta), theta, theta))+1.41357763467822*(diff(U(x, theta), theta, theta, theta, theta)):

PD2 := 3.52500000000000*(diff(V(x, theta), x, x, x, x))-3150.00*(diff(V(x, theta), x, x))+5.05278814097746*(diff(V(x, theta), theta, theta, theta, theta))-4972.65371594662*(diff(V(x, theta), theta, theta))+10.2112755389544*(diff(V(x, theta), x, x, theta, theta))+7.22165554279476*(diff(U(x, theta), x, x, x, theta))+4.57316679658261*(diff(U(x, theta), x, theta, theta, theta))-2536.53190552708*(diff(U(x, theta), x, theta))+97.2834589649212*(diff(W(x, theta), x, x, theta))+30.9917088694028*(diff(W(x, theta), theta, theta, theta))-31273.9463175575*(diff(W(x, theta), theta)):

PD3 := -0.168000000000000e-2*(diff(W(x, theta), x, x, x, x, x, x))+16.9000000000000*(diff(W(x, theta), x, x, x, x))-0.319161728473364e-2*(diff(W(x, theta), x, x, x, x, theta, theta))-37.5000000000000*(diff(W(x, theta), x, x))+796.276013656496*(diff(W(x, theta), x, x, theta, theta))-0.202111525639098e-2*(diff(W(x, theta), x, x, theta, theta, theta, theta))-36.0000000000000*(diff(U(x, theta), x, x, x))+9375.00*(diff(U(x, theta), x))+15.6731205946742*(diff(U(x, theta), x, theta, theta))-97.2834589649212*(diff(V(x, theta), x, x, theta))+31273.9463175575*(diff(V(x, theta), theta))-30.9917088694028*(diff(V(x, theta), theta, theta, theta))+2.06625000000000*10^5*W(x, theta)+313.462411893484*(diff(W(x, theta), theta, theta))+6.77715234781900*(diff(W(x, theta), theta, theta, theta, theta))-0.426628729281504e-3*(diff(W(x, theta), theta, theta, theta, theta, theta, theta))-400/((1-h3*f3(x))*ln(10-10*h3*f3(x))^2)-500/(1-h3*f3(x))^4:

BC := {D[1](U)*(0, theta) = 0, D[1](U)*(1, theta) = 0, D[1](U)*(x, 0) = 0, D[1](U)*(x, 1) = 0, D[1](V)*(0, theta) = 0, D[1](V)*(1, theta) = 0, D[1](V)*(x, 0) = 0, D[1](V)*(x, 1) = 0, D[1](W)*(0, theta) = 0, D[1](W)*(1, theta) = 0, D[1](W)*(x, 0) = 0, D[1](W)*(x, 1) = 0, D[2](W)*(0, theta) = 0, D[2](W)*(1, theta) = 0, D[2](W)*(x, 0) = 0, D[2](W)*(x, 1) = 0, U(0, theta) = 0, U(1, theta) = 0, U(x, 0) = 0, U(x, 1) = 0, V(0, theta) = 0, V(1, theta) = 0, V(x, 0) = 0, V(x, 1) = 0, W(0, theta) = 0, W(1, theta) = 0, W(x, 0) = 0, W(x, 1) = 0}

``

 

Download 2D.mw

So, I am working in a partial differeital equations course and we are doing image processing. I am taking an image and pixel by pixel applying the heat equation to smudge out noise. I created a for loop for the equation and it works, I need to itterate it over and over again. Here is my code:

for t from 1 to 20 do    

for j from 2 to 149 do

for k from 2 to 149 do  

`tile2__j,k`:=dellT/(h^(2))*(`tile__j+1,k`-4*`tile__j,k`+`tile__j-1,k`+`tile__j,k-1`)+`tile__j,k`  

 end do

end do  

for m from 2 to 149 do

for n from 2 to 149 do  

`tile__m,n`:= `tile2__m,n`  

end do

end do  

t := t+1  

end do

 

Sorry, I could not get the Maple Math editor to work so I just copied my code. Apologize. I keep getting the error "Error, Invalid loop statement termination." Help?

 

hi.please help me for solve algebric equations below?

solve or fsolve dos not any answer?

i think use Newton  Raphson, because solve or fsolve not work.

thankscomparision.mw

restart; mu1 := .1; mu2 := .1; sigma1 := -40; F := 25; upsilon1 := (1/2)*sigma2; upsilon2 := (3/2)*sigma2-sigma1; sigma2 := 100

100

(1)

gamma11 := 2.686901; -1; gamma12 := 7.175339; -1; gamma21 := 2.436735; -1; gamma22 := 12.94855; -1; gamma22 := 12.94855; -1; delta1 := .928207; -1; delta2 := .105073; -1; s11 := .629894; -1; s12 := .217601; -1; s21 := 0.73897e-1; -1; s22 := .805815

.805815

(2)

 

 

 

 
Q1 := -mu1*p1-upsilon1*q1+gamma11*q1*(p1^2+q1^2)+gamma12*q1*(p2^2+q2^2)-delta1*(2*p1*q1*p2-q2*(p1^2-q1^2))-s11*F*q1+s12*F*q2 = 0

-.1*p1-65.747350*q1+2.686901*q1*(p1^2+q1^2)+7.175339*q1*(p2^2+q2^2)-1.856414*p1*q1*p2+.928207*q2*(p1^2-q1^2)+5.440025*q2 = 0

(3)

Q2 := -mu1*q1+upsilon1*p1-gamma11*p1*(p1^2+q1^2)-gamma12*p1*(p2^2+q2^2)-delta1*(2*p1*q1*q2+p2*(p1^2-q1^2))-s11*F*p1-s12*F*p2 = 0

-.1*q1+34.252650*p1-2.686901*p1*(p1^2+q1^2)-7.175339*p1*(p2^2+q2^2)-1.856414*p1*q1*q2-.928207*p2*(p1^2-q1^2)-5.440025*p2 = 0

(4)

Q3 := -mu2*p2-upsilon2*q2+gamma21*q2*(p1^2+q1^2)+gamma22*q2*(p2^2+q2^2)+delta2*(3*p1^2*q1-q1^3)+s21*F*q1 = 0

-.1*p2-190*q2+2.436735*q2*(p1^2+q1^2)+12.94855*q2*(p2^2+q2^2)+.315219*p1^2*q1-.105073*q1^3+1.847425*q1 = 0

(5)

Q4 := -mu2*q2+upsilon2*p2-gamma21*p2*(p1^2+q1^2)-gamma22*p2*(p2^2+q2^2)+delta2*(-p1^3+3*p1*q1^2)-s21*F*p1 = 0

-.1*q2+190*p2-2.436735*p2*(p1^2+q1^2)-12.94855*p2*(p2^2+q2^2)-.105073*p1^3+.315219*q1^2*p1-1.847425*p1 = 0

(6)

 

-.1*q2+((3/2)*sigma2-40)*p2-2.436735*p2*(p1^2+q1^2)-12.94855*p2*(p2^2+q2^2)-.105073*p1^3+.315219*q1^2*p1-1.847425*p1

(7)

NULL

fsolve({Q1, Q2, Q3, Q4}, {p1, p2, q1, q2})

fsolve({-.1*p1-65.747350*q1+2.686901*q1*(p1^2+q1^2)+7.175339*q1*(p2^2+q2^2)-1.856414*p1*q1*p2+.928207*q2*(p1^2-q1^2)+5.440025*q2 = 0, -.1*p2-190*q2+2.436735*q2*(p1^2+q1^2)+12.94855*q2*(p2^2+q2^2)+.315219*p1^2*q1-.105073*q1^3+1.847425*q1 = 0, -.1*q1+34.252650*p1-2.686901*p1*(p1^2+q1^2)-7.175339*p1*(p2^2+q2^2)-1.856414*p1*q1*q2-.928207*p2*(p1^2-q1^2)-5.440025*p2 = 0, -.1*q2+190*p2-2.436735*p2*(p1^2+q1^2)-12.94855*p2*(p2^2+q2^2)-.105073*p1^3+.315219*q1^2*p1-1.847425*p1 = 0}, {p1, p2, q1, q2})

(8)

solve(Q1, Q2, Q3, Q4)

Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is -.1*q1+34.252650*p1-2.686901*p1*(p1^2+q1^2)-7.175339*p1*(p2^2+q2^2)-1.856414*p1*q1*q2-.928207*p2*(p1^2-q1^2)-5.440025*p2 = 0

 

Sol := [fsolve(ZZ, omega)]



Download comparision.mw

I'm having trouble plotting a couple things. I have

eq := diff(y(x), x$3)+3*diff(y(x),x$2)+12*y(x);
soln := dsolve(eq, y(x));
soln := evalf(soln);
PartSoln1 := dsolve({eq, y(0) = a,y'(0) = 0,y''(0) = 0}, y(x));
curves := {seq(PartSoln1, a = -3 .. 3)};
Then when I try plot(curves, x = -1..5, y = -5..5); I get Warning, expecting only range variable x in expression PartSoln1 to be plotted but found name PartSoln1.

Also,
charEq := r^3+r+1 = 0;
soln := solve(charEq, r);
soln := [evalf(soln, 5)];
soln := map(Re, soln);

I tried a few things, but can't figure out how to plot charEq, including the real roots.

Thanks for any help,

Heather

Here is a code

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/EQ.mw .

Download EQ.mw

A fragment of code

for b in extra_bcs do try print(b = 10^(-2)); res[b] := dsolve(dsys4 union {b = 10^(-2)}, numeric, initmesh = 2024, output = listprocedure, approxsoln = [omega2 = 0.1e-2, s(x) = cosh(upsilon*x)-cos(upsilon*x)-(cosh(upsilon)+cos(upsilon))*(sinh(upsilon*x)-sin(upsilon*x))/(sinh(upsilon)+sin(upsilon)), g(x) = sin(((2*n+1)*(1/2))*Pi)], abserr = 0.1e-1) catch: print(lasterror) end try end do; indx := indices(res, nolist); nops([indx]); res[indx[i]]; seq(subs(res[indx[i]](1), omega2(1)), i = 1 .. nops([indx]))

hi.

how i can select or chose proper polynomials or another functions that attached boundary conditions at points zero and one , weakly or strongly satisfy??polynomial.mw

s(0) = 0, ((D@@1)(s))(0) = 0, g(0) = 0, ((D@@2)(s))(1) = 0, ((D@@3)(s))(1) = 0, ((D@@1)(g))(1)+(1/2)*((D@@1)(s))(1)^2 = 0

s(0) = 0, (D(s))(0) = 0, g(0) = 0, ((D@@2)(s))(1) = 0, ((D@@3)(s))(1) = 0, (D(g))(1)+(1/2)*(D(s))(1)^2 = 0

(1)

``

 

Download polynomial.mw

thanks...

hi.i calculate this integral numerically but after use this result in my differential equation which is involve f3(x), i enconter with error

i found that this problem is due to answer of this integtal.may i use another way to calculte it?as shown power in result are very large!!!

``

restart; Digits := 15; g3 := theta^2*(theta-1)^2; beta := 100; chi := 5; kappa := 5; a := 0

0

(1)

with(Student[Calculus1]); -1; a31 := evalf(ApproximateInt(-beta^2*g3/((1-g3*f3(x))*ln(2*kappa*(1-g3*f3(x)))^2), theta = a .. 1, method = simpson)); -1; a32 := evalf(ApproximateInt(-chi*g3/(1-g3*f3(x))^4, theta = a .. 1, method = simpson))

-1.33333333333333*(-0.191597582462488e152*f3(x)-0.863011826221205e146*f3(x)^9-0.706378636532818e148*f3(x)^7+0.846944805095211e147*f3(x)^8+0.130151241709538e151*f3(x)^4-0.283379399043279e150*f3(x)^5+0.493554199542613e149*f3(x)^6+0.117104095781373e152*f3(x)^2-0.459581479474515e151*f3(x)^3+0.151119505345015e152+0.755561753647024e145*f3(x)^10+0.175123383079432e97*f3(x)^36-0.244416009548583e100*f3(x)^35+0.163803382818292e103*f3(x)^34-0.704973843312161e105*f3(x)^33+0.219681545650952e108*f3(x)^32-0.529211072065593e110*f3(x)^31+0.102639576866076e113*f3(x)^30-0.164658103849427e115*f3(x)^29+0.222629381398692e117*f3(x)^28-0.257124576224432e119*f3(x)^27+0.256176429040311e121*f3(x)^26-0.221804182616290e123*f3(x)^25+0.167834727658308e125*f3(x)^24-0.111474607475097e127*f3(x)^23+0.652137994527267e128*f3(x)^22-0.336921770775584e130*f3(x)^21+0.154034904897255e132*f3(x)^20-0.624063631993155e133*f3(x)^19+0.224251041670249e135*f3(x)^18-0.714943093769717e136*f3(x)^17+0.202175772822691e138*f3(x)^16-0.506683948932158e139*f3(x)^15+0.112368506172683e141*f3(x)^14-0.220033360070981e142*f3(x)^13+0.379271084508473e143*f3(x)^12-0.573179869691401e144*f3(x)^11)/((-160000.+9801.*f3(x))^4*(-16.+f3(x))^4*(-256.+9.*f3(x))^4*(-10000.+441.*f3(x))^4*(-160000.+8281.*f3(x))^4*(-625.+36.*f3(x))^4*(-160000.+361.*f3(x))^4*(-10000.+81.*f3(x))^4*(-160000.+2601.*f3(x))^4*(-625.+16.*f3(x))^4)

(2)

``

 

Download integral.mwintegral.mw

thanks..

I have written a code which generates a Gaussian like curve as a set of points and have written some basic commands to find several important quantities from the plot. The three of importance here are the peak position, peak height and Full Width at Half Maximum.

See the attached minimal working example maple worksheet.

It can find the peak position and the peak height no problem, but another quantity I want it to find is the Full Width at Half Maximum (FWHM). I use the aforementioned calculated values to find the left and right components of the FWHM but the fsolve command just hangs.

In the worksheet this is not evident but in the much longer full code which I run through the terminal and prints the values to a file, it begins the fsolve command and reaches a particular value and it just hangs. No amount of waiting time makes it continue the calculation.

However if I use an approximate integration scheme (such as Riemann sums) then the fsolve part executed perfectly. fslove seems to get stuck during the numerical integration step.

There is probably an easy answer to this problem which I am missing. Any help is appreciated.

fsolve_numerical_integration.mw

 

- Yeti

I have an equation eq := diff(y(x), x$3)+3*diff(y(x), x$2)+12*y(x);

dsolve(eq, y(x)); gave me a general solution.

I tried to get a particular solution using dsolve({eq, y(0) = a, y'(0)=0, y"(0) = 0}, y(x));

But I got Error, (in dsolve) not a system with respect to the unknowns [y(x)].

Thank you for any help.

Heather

I have the system:

 

Update:

{-1/2 < 2*f*(1/53)+7*g*(1/53), 3/106 < 7*f*(1/53)-2*g*(1/53), 2*f*(1/53)+7*g*(1/53) < -37/106, 7*f*(1/53)-2*g*(1/53) < 1/2}

 

which I wish to solve over integers but isolve() gives me "Warning, solutions may have been lost and no solutions". The solutions exist and are {[f =0, g = -3] || [f = 1, g = -4], [f = 1, g = -3] || [f = 2, g = -4]}, but I cannot obtain them with Maple. Could you tell me what is wrong and how I should treat this kind of problems in the future, please.

Mathematica 10.0

Reduce[{-1/2 < 2*f*(1/53) + 7*g*(1/53), 3/106 < 7*f*(1/53) - 2*g*(1/53), 2*f*(1/53) + 7*g*(1/53) < -37/106, 7*f*(1/53) - 2*g*(1/53) < 1/2}, {f, g}, Integers]

(f == 0 && g == -3) || (f == 1 && g == -4) || (f == 1 &&
   g == -3) || (f == 2 && g == -4)

 

Maple

isolve({-1/2 < 2*f*(1/53)+7*g*(1/53), 3/106 < 7*f*(1/53)-2*g*(1/53), 2*f*(1/53)+7*g*(1/53) < -37/106, 7*f*(1/53)-2*g*(1/53) < 1/2});
Warning, solutions may have been lost

 

Gentlemen

As seen on tv.

Having issues with animating the movement of two fielders, (25m apart on a straight line) when a baseball is struck towards them. they're on the y axis when they should be on the x.... and they should be green and brown dots, not lines.....

BaseballBallistics.mw

Hello!

I am calculating the temperature of a rod which has one end at the temperature T1 and the other end at T2 and it's evolution. We were already given the formula for the numeric calculation and after a short while I managed to obtain a small program that would calculate the temperature of each segment of the T(x,t) grid:

>restart: with(plots): nx:=20: tmax:=50: T1:=1: T2:=10: L:=1: k:=1: rho:=1: cp:=1: chi:=k/rho/cp: h:=L/(nx-1): t:=1e-3:
>for k from 0 to nx do T(k,0):=T1 od:
for w from 1 to tmax do
T(0,w):=T1: T(nx,w):=T2:
for q from 1 to nx-1 do
T(q,w):=T(q,w-1)+chi*t/h^2*(T(q+1,w-1)+T(q-1,w-1)-2*T(q,w-1));
od: od:

With L the Length of the rod, t and h the time and space increment [h=L/(nx-1), where nx is the number of intervals we divide the x-axis, although I'm not quite sure the '-1' should be there], chi a constant different for each rod and tmax total time we want to calculate. The formula from the 5th line was given to us, so in that part there is no mistake.

Up until here everything works perfectly fine.

Now I want to be able to draw this and here is where all the problems appear. I want to draw this in a 2D graph with position in the x-axis and time in the y-axis. I have tried "densityplot(T(x,y),x=0..nx,y=0..tmax)" which would seem to be the logical whay to continue this. As I understand it, this plot would draw an nx times tmax grid and colour the whole plpot black-white acording to the maximum and the minimum value (as shown in the maple help page of this plot).

However, when I do this a black square appears (or red if I add colorstyle=HUE). I have tried a lot of things and none seemed to work.

I would also like to be able to draw the isotherms on the plot but that is secondary.

 

I am pretty new to Maple. I have studied the most basic things but don't really understand the whole complexity of this program. Thanks a lot in advance and forgive my faulty english,

Enrique

First 46 47 48 49 50 51 52 Last Page 48 of 71