MaplePrimes Questions

Given a list with sublists e.g.

[[a,b],[[c,d,e]]]

is there a way of merging everything into a single list, for example

[a,b,c,d,e]

i have a problem when i try to re run my code by doing execute entire sheet, but when i first create it, it run without any errors
Thanks

Hi

I have a Vector of polynomials in x[1] and x[2]; and I want to use coeffs to get the coefficients of bothe elements of the Vector; using the command:

Eq2Coeffs := `~`[coeffs](%, [x[1], x[2]])

bizarely the result i get is something in terms of x[1] and x[2].

Here is the worksheet this problem emerged in, the specific command is 3.8.

Hi , 

I want to ask if there is any maple code of how to construct wavelet to solve fractional differential eqautions? Or any reference may be help me 

thanks 

Hi there!

I like to work with output labels, since it allows me to execute a lot of code without having to make sure the respective previous calculations already ran each time I open the file.

Say my output is a list, and has label (1.3), then I can address the 2nd element of that list by (1.3)[2].

Sometimes output is organised in cases, for example when solving for the root of an equation. How can I address a specific case of that output using the output’s label?

If the case specifier is simple enough I can do that with "assuming". But when it is more complicated it is quite cumbersome to do so.

Thanks for help!

In the following program why the first row of Matrix P is costant, while I expect it varies?


 

``

``

restart

with(LinearAlgebra):

MCK := Matrix(1, 1, {(1, 1) = 0.1627682387e-16*mu})

P := Matrix(2, 111):

`ρ__∞` := 1.225:

j := 1:

for `U__&infin;` from 333 to 335 do `M__&infin;` := `U__&infin;`/(331.2); mu := `&rho;__&infin;`*`U__&infin;`*(`M__&infin;`^2-2)/sqrt((`M__&infin;`^2-1)^3); P[1 .. 2, j] := `<,>`(`<,>`(MCK), `<,>`(j)); j := j+1 end do:

P[1, 1 .. j-1]

Vector[row]([0.1627682387e-16*mu, 0.1627682387e-16*mu, 0.1627682387e-16*mu])

(1)

``


 

Download Sooal.mw

here my problem i work on ;

i want maple to end the enternal loop if it can't solve the equation after  some iteration maple couldnt solve the equation and get stuck

 

with(LinearAlgebra); with(VectorCalculus); with(Student[LinearAlgebra]); with(SignalProcessing); with(Statistics); with(stats)

f[1] := n/R+sum(x[i], i = 1 .. n)-(sum((2+a[i])*x[i]*exp(R*x[i])/(exp(R*x[i])-1+Q), i = 1 .. n))

f[2] := m/S+sum(y[j], j = 1 .. m)-(sum((2+b[j])*y[j]*exp(y[j]*S)/(exp(y[j]*S)-1+Q), j = 1 .. m))

f[3] := (n+m+sum(a[i], i = 1 .. n)+sum(b[j], j = 1 .. m))/Q-(sum((2+a[i])/(exp(R*x[i])-1+Q), i = 1 .. n))-(sum((2+b[j])/(exp(y[j]*S)-1+Q), j = 1 .. m))

NULL

E1[1] := 0.5e-1

E2[1] := 0.5e-1

E3[1] := 0.5e-1

n := 45; m := 45

n := 45; m := 45

a := [seq(0, i = 1 .. 21), 2, 2, 1, seq(0, i = 1 .. 21)]; b := [seq(0, i = 1 .. 21), 2, 2, 1, seq(0, i = 1 .. 21)]

lambda1 := .9; lambda2 := .1; `&alpha;_&alpha;` := 5

K := 1000

so := 1; while so < K+1 do W := GenerateUniform(n, 0, 1); for iii to n do vv[iii] := W[iii]^(1/(iii+sum(a[jjj], jjj = n-iii+1 .. n))) end do; for sss to n do uu[sss] := 1-product(vv[n-jjj+1], jjj = 1 .. sss); x[sss] := fsolve(1-`&alpha;_&alpha;`/(exp(lambda1*t)-1+`&alpha;_&alpha;`) = uu[sss], t = 0 .. infinity) end do; U := GenerateUniform(m, 0, 1); for ii to m do v[ii] := U[ii]^(1/(ii+sum(b[jj], jj = m-ii+1 .. m))) end do; for ss to m do u[ss] := 1-product(v[m-jj+1], jj = 1 .. ss); y[ss] := fsolve(1-`&alpha;_&alpha;`/(exp(lambda2*t)-1+`&alpha;_&alpha;`) = u[ss], t = 0 .. infinity) end do; c := describe[quartile[1]]([seq(x[i], i = 1 .. n)]); cc := describe[quartile[3]]([seq(x[i], i = 1 .. n)]); L := describe[quartile[1]]([seq(y[i], i = 1 .. m)]); LL := describe[quartile[3]]([seq(y[i], i = 1 .. m)]); R[1] := fsolve(9*exp(R*c)-exp(R*cc) = 8, R = 0 .. infinity); S[1] := fsolve(9*exp(S*L)-exp(S*LL) = 8, S = 0 .. infinity); Q[1] := 3*(exp(R[1]*c)-1+(exp(S[1]*L)-1))*(1/2); for h to 40 while `and`(`and`(`and`(`and`(`and`(abs(E1[h]) > 0.5e-3, abs(E2[h]) > 0.5e-3), abs(E3[h]) > 0.5e-3), Q[h] > 2), S[h] > 0), R[h] > 0) do printlevel := 2; Q[h+1] := fsolve(eval(f[3], {R = R[h], S = S[h]}) = 0, Q = 0 .. infinity); S[h+1] := fsolve(eval(f[2], Q = Q[h+1]) = 0, S = 0 .. infinity); R[h+1] := fsolve(eval(f[1], Q = Q[h+1]) = 0, R = 0 .. infinity); if fsolve(eval(f[3], {R = R[h], S = S[h]}) = 0, Q = 0 .. infinity) = NULL then break end if; if fsolve(eval(f[2], Q = Q[h+1]) = 0, S = 0 .. infinity) = NULL then break end if; if fsolve(eval(f[1], Q = Q[h+1]) = 0, R = 0 .. infinity) = NULL then break end if; E1[h+1] := abs(R[h+1]-R[h]); E2[h+1] := abs(S[h+1]-S[h]); E3[h+1] := abs(Q[h+1]-Q[h]); KK := Matrix([[R[h]], [S[h]], [Q[h]]]) end do; A[so] := Determinant(KK[1]); B[so] := Determinant(KK[2]); C[so] := Determinant(KK[3]); so := so+1 end do

Error, cannot determine if this expression is true or false: 0 < K

 

NULL

NULL


 

Download Q3.mw

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hello to everyone!

 

I was trying to implement the following proc:
 

``

restart; with(plots); with(plottools)

"AngleSpectrum  :=  proc( theta )  local A, B, C, a1,a2,col,k,n;  n := floor(2*Pi/theta):  for k from 1 to n do      a1 := theta*(k-1);   a2 := theta*(k);      if( k mod 2 = 0) then col := COLOR(RGB,.8,.3,.5);      else col := COLOR(RGB,.4,.3,.5) ; fi;      A[k] := plottools[pieslice]([0,0], 1, a1..a2, color = col  ):      C[k] := textplot( [ evalf(1.2*cos(a2)), evalf(1.2*sin(a2)),                   convert(a2, string)]):  od:  display( seq( {A[k], C[k]}, k = 1..n), scaling=constrained);  end proc:"

Error, unterminated loop

"AngleSpectrum  := proc( theta )  local A, B, C, a1,a2,col,k,n;  n := floor(2*Pi/theta):  for k from 1 to n do   a1 := theta*(k-1); a2 := theta*(k);  if( k mod 2 = 0) then col := COLOR(RGB,.8,.3,.5);      else col := COLOR(RGB,.4,.3,.5) ; fi;  A[k] := plottools[pieslice]([0,0], 1, a1..a2, color = col  ):  C[k] := textplot( [ evalf(1.2*cos(a2)), evalf(1.2*sin(a2)),   convert(a2, string)]):  od:  display( seq( {A[k], C[k]}, k = 1..n), scaling=constrained);  end proc:"

 

``


Can anyone help me to figure out my mistake?

Download proc.mw

Good day everyone,

          I am trying to write a code for the loop of the equations below such the Theta[k] and Phi[k] start from 2 to M while F[k] starts from 4  to M.

         Anyone with good informations should please.
         Below is the link.

Thanks in anticipation

Solution_1.mw

Hi there!

In order to keep the code more readable, and to spare myself some brackets, I am trying to use the function composition to write

simplify(eval(f(x),x=a))

as

simplify@eval(f(x),x=a))

but it doesn't work. How would I do it the right way? (I am coding in 2D math)

 

Thanks for help!

Hello everyone! I have just started to using Maple 13. I want to solve complex eauation systems.

When I am working on Maple, If I write simple mathematical calculation and then press right click, the context menu open. However, I want to use solve command. Therefore I wrote an eauation after than press right click the context menu will not open. 

What is the reason of this problem? 

Hi everyone, I need to use the integral calculation in MapleSim but there is no MapleSim Block to do it. So I create a Custom Component and using the integral calculation from Maple, the expression of the equation was done. But when I click Dimension analysis button, one error popped out as the photo. Have anyone got the same error before? How should I do to solve it? Thank you very much.

Hi

Assume a linear second order ode with constant coefficients as follows:

M*u''+C*u'+K*u=0

where the symbol (') denotes derivative with respect to time and M, C and K are positive real constants.

The initial conditions are u(0)=u0 and u'(0)=u'0.

Substituting u=exp(a*t) in the ODE to calculate characteristic equation, one has

M*a^2+C*a+K=0  ---> If 0<C<2sqrt(M*K) then u=exp(-C/(2M)*t)*(c1*sin(w*t)+c2*cos(W*t))

in which c1 and c2 can be obtained from initial conditions and W=sqrt(C^2-4*M*K)/2M.

For the case that C is imaginary number, assuming C=i*c yields

{a1,a2} ={ -(c/(2M) +sqrt(c^2+4*M*K)/2M)*i,(-c/(2M) +sqrt(c^2+4*M*K)/2M)*i }

where i is one of the square roots of -1.

Is it true to write u=c1*(sin(a1*t)+cos(a1*t))+c2*(sin(a2*t)+cos(a2*t)) ?

I solve two examples by Maple,

dsolve({diff(u(t), t, t)+0.1*(diff(u(t), t))+2*u(t)} union {u(0) = 1, (D(u))(0) =0.1});

dsolve({diff(u(t), t, t)+0.1*I*(diff(u(t), t))+2*u(t)} union {u(0) = 1, (D(u))(0) = 0.1});

Second example gives complex answer. Is it possible to get trigonometric answer with real constants c1 and c2?

Hi folks,

I've just now installed Maple player, and I find it crashes immediately when I run it:

Exception in thread "Request id 1" java.lang.UnsupportedOperationException: PERPIXEL_TRANSLUCENT translucency is not supported
        at java.awt.Window.setBackground(Window.java:3842)
        at java.awt.Frame.setBackground(Frame.java:988)
        at com.maplesoft.worksheet.application.WmiSplashScreen.<init>(Unknown Source)
        at com.maplesoft.worksheet.player.WmiPlayerStartupStrategy.showSplash(Unknown Source)
        at com.maplesoft.worksheet.application.WmiGenericStartupStrategy.doStartup(Unknown Source)
        at com.maplesoft.worksheet.player.WmiPlayerStartupStrategy.doStartup(Unknown Source)
        at com.maplesoft.application.Maple.doStartup(Unknown Source)
        at com.maplesoft.application.Application.startup(Unknown Source)
        at com.maplesoft.application.ServerProtocol$StartApplicationHandler.processCommand(Unknown Source)
        at com.maplesoft.application.ServerProtocol.executeCommand(Unknown Source)
        at com.maplesoft.application.ServerProtocol.processNextStep(Unknown Source)
        at com.maplesoft.application.ExchangeProtocol.executeProtocol(Unknown Source)
        at com.maplesoft.application.ApplicationManager$Listener.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:748)


The operating system is CentOS 7 (64 bit).   Any idea how I can fix this?

Thanks,

Bryan

How to solve system of convolution equations in maple?

First 444 445 446 447 448 449 450 Last Page 446 of 2084