MaplePrimes Questions

Hello colleagues

I use Maple 2020 and I try to create Histogram of Poisson with a mean 200 [ Histogram(Sample(Poisson(200),10000))]. but I get an incorrect result in the form of a histogram as uniform distribution. But In my Maple 2015 I get a correct result.what is the problem?

Dear every one.

Hi.

I am trying to set up an surface integral in maple. I have been trying with the Student[VectorCalculus] package.

I have also tried to use the task template for surface integral over a disk but somehow I mess up huge time.

I have tried to find help online and in maple help center. If anyone would please take time to explain the syntax of the SurfaceInt command id be happy.

Can someone teach me how to solve this exam.

Thank you.

 

The function subsets is an iterator for generating the power set of a set one set at a time.  I wanted to get iterators for all  k -subsets , so I modified the codes for getitng  iterators for the power set in the help document.

with(combinat):
k:=3:
S := subsets({1,2,3,4,a}):
while not S[finished] do
   s1:=S[nextvalue]();
 if nops(s1)=k then 
    print(s1);
    end if;
end do:

 

 

 

But I think the iterative process is done in filtering, which means that maple runs out of power sets. It may not save time.

And of course we can use "choose" to get all k-subsets at once.

choose({1,2,3,4,a}, 3)

 

So my question is is there an iterator that takes less time to get a k-subset .

I prefer the iterator to the choose function because it saves memory and makes it easy to set some breakpoints in the program to terminate the process.

Another interesting thing is that I looked at the source code when use print and it didn't seem to show.

interface(prettyprint=2):
print(combinat:-subsets)

 

 

 

 

Hello, 

I use Syrup to solve for the transfer function of a circuit, and in particular, the voltage at a given node.   If I use the "trans" option, the solution generates the expected result, in the expected format.  Syrup solves the differential equations and the resulting time domain equation is as expected.

If I then use the 'AC'  option, I get the result in the s-domain.  I then solve for the step response, and take the inverse Laplace transform.  The solution is given in terms of sinh and cosh.   

If I plot the voltage in either solution as a function of time, the plots are identical.  So, the sinh/cosh solution must be somehow simplifiable so that it "looks" like the time domain solution I get from the transient analysis.
 

restart

with(inttrans)

with(Syrup)NULL

with(DynamicSystems)

interface('displayprecision' = 8)

with(plots)

NULL

assum := R1::real, C1::real, R2::real, C2::real, R1 > 0, R2 > 0, C1 > 0, C2 > 0, t::realvin::real, vin > 0

vin::real, 0 < vin

(1)

ckt := [vin(5), Rm(1.0*10^7), Cm(1.8*10^(-11), ic = 0), `&//`(R1(9.*10^6), C1(1.5*10^(-11), ic = 0)), `&//`(R2(1.*10^6), C2(1.5*10^(-11), ic = 0))]

[vin(5), Rm(10000000.0), Cm(0.1800000000e-10, ic = 0), `&//`(R1(9000000.), C1(0.1500000000e-10, ic = 0)), `&//`(R2(1000000.), C2(0.1500000000e-10, ic = 0))]

(2)

NULL

NULL

ckt1 := [vin(0), Rm(0.10e8), Cm(0.18e-10, ic = 2.5), `&//`(R1(0.9e7), C1(0.15e-10, ic = 2.25)), `&//`(R2(0.1e7), C2(0.15e-10, ic = .25))]

[vin(0), Rm(0.10e8), Cm(0.18e-10, ic = 2.5), `&//`(R1(0.9e7), C1(0.15e-10, ic = 2.25)), `&//`(R2(0.1e7), C2(0.15e-10, ic = .25))]

(3)

Draw(ckt)

Solution doing Transient Analysis

deqs, rest := Solve(ckt, 'tran', 'returnall')

sol1 := dsolve(deqs):

Reassign rest to include the solution.

rest := eval(rest,sol1):

Compute the voltage across the capacitor Cm.

tmp1:=simplify(eval(v[Cm](t), sol1));

(1/32164)*(-415*8041^(1/2)-40205)*exp((100000/459)*(-119+8041^(1/2))*t)+5/2+(1/32164)*(415*8041^(1/2)-40205)*exp(-(100000/459)*(119+8041^(1/2))*t)

(4)

evalf[5]((1/32164)*(-415*8041^(1/2)-40205)*exp((100000/459)*(-119+8041^(1/2))*t)+5/2+(1/32164)*(415*8041^(1/2)-40205)*exp(-(100000/459)*(119+8041^(1/2))*t))

-2.4070*exp(-6389.4*t)+2.5000-0.92993e-1*exp(-45461.*t)

(5)

solve(tmp1=2.5*(1-exp(-1)),t)

p10 := plot(tmp1, t = 0 .. 0.00050000, color = 'blue', linestyle = 'dash')

p10 := plot(tmp1, t = 0 .. 0.5e-3, color = 'blue', linestyle = 'dash')

 

Solution from AC analysis:

sol, rest := Solve(ckt, 'returnall')

vnode2 := eval(v[2], sol)

1000000*(27*s+1000000)/(1377*s^2+71400000*s+400000000000)

(7)

1000000*(27*s+1000000)/(1377*s^2+71400000*s+400000000000)

(8)

``

NULLNULL

Impulse Response

temp1 := invlaplace(vnode2, s, t)

(1000000/24123)*exp(-(700000/27)*t)*(3*8041^(1/2)*sinh((100000/459)*t*8041^(1/2))+473*cosh((100000/459)*t*8041^(1/2)))

(9)

"(->)"

41.454*exp(-25926.*t)*(269.02*sinh(19536.*t)+473.*cosh(19536.*t))

(10)

Step Response

temp2 := invlaplace(vnode2/s, s, t)

5/2-(5/16082)*exp(-(700000/27)*t)*(83*8041^(1/2)*sinh((100000/459)*t*8041^(1/2))+8041*cosh((100000/459)*t*8041^(1/2)))

(11)

p1 := plot({temp2, (1-exp(-1))*2.5}, t = 0 .. 0.5e-3)

temp3 := solve(temp2 = (1-exp(-1))*2.5, t)

0.1505875131e-3

(12)

p2 := plot([temp3, temp3], [0, 2.5])

display({p1, p10, p2})

 
   

``

What is going on?  Where are the sinh and cosh terms in the solution coming from and why wont it simplify so that it looks like the other solution if they are identical?  Is there something special I need to do when using the invlaplace function?

Thanks!

Download help_maple.mw

 

 

My Maple worksheet, which was working fine a few days ago, suddently cannot be modified. Many elements on the top bar (execute group, execute entire worksheet, insert maple prompt) are grayed out. Additionally I cannot edit any commands in the worksheet; clicking a command does not show any cursor and keyboard input does nothing.

Apparently I have entered some kind of read-only mode. I do not know how I did this. Meanwhile, if I start a new worksheet I can edit and execute as normal.

How do I revert my worksheet back to normal?

Hello! 

I dont like cursing, but this had got me going. 

How are there no solutions for the intersection points, i am only getting some, but not all of them, but i did ask Maple to produce an answer, but it however failed to produce all the answers. Its not that i did not try different techniques. 

I really wonder what went wrong. How could this be?! Just Maple... Answers between zero and 2 Pi... plz.... (!!!)

The answers i get with the suggested method from my math book dont give any straight answer. How is that an answer, i dont want imaginary numbers, i dont want to have  Z values (what is with that anyways?)..

Well here is what i found. Also if i were to ask for solutions between x values closer together i got more answers that were not there before. That is not what i want, that is like manual labor, that is not what i want at all, i want to be faster not slower. My graphing calculator was even a faster and that did get all the answers right away.. 

Any way, it missed an answer between 1/2Pi and Pi, answers that were not there before when looking for values between 0 and 2Pi. 

So, so odd..


It says in english: Also with finding solutions for solving goniometric equations with Maple, we should not forget that there are more solutions than just one, most of the times. We give you two methods to find all the solutions for solving goniometric equations. 

 

#first attempt

evalf(solve({x > 0*Pi, sin(x) = cos(4*x-(1/6)*Pi), x < 2*Pi}, x, allsolutions, explicit)); smartplot(sin(x), cos(4*x-(1/6)*Pi)); plot([sin(x), cos(4*x-(1/6)*Pi)], x = 0 .. 2*Pi, y = 0 .. 1); evalf(solve({x > (1/2)*Pi, sin(x) = cos(4*x-(1/6)*Pi), x < Pi}, x, allsolutions, explicit))

{x = 4.188790204}, {x = 5.445427267}

 

 

 

{x = 1.675516082}, {x = 2.932153141}

(1)

#second attempt

"f(x):=sin(x); g(x):= cos(4 x-1/(6)*Pi);fsolve([f,g]);"

proc (x) options operator, arrow, function_assign; sin(x) end proc

 

proc (x) options operator, arrow, function_assign; cos(4*x-(1/6)*Pi) end proc

 

[6.8067840827778841, -9.1035796650957585]

(2)

#third attempt;

_EnvAllSolutions := true; solve(sin(x) = cos(4*x-(1/6)*Pi), x)

-(2/3)*Pi+2*Pi*_Z4, -arctan((1/6)*3^(1/2)*(2*((1/2)*(4+(4*I)*3^(1/2))^(1/3)+2/(4+(4*I)*3^(1/2))^(1/3))^2-(1/2)*(4+(4*I)*3^(1/2))^(1/3)-2/(4+(4*I)*3^(1/2))^(1/3)-4)/((1/4)*(4+(4*I)*3^(1/2))^(1/3)+1/(4+(4*I)*3^(1/2))^(1/3)))+2*Pi*_Z5, -arctan((1/6)*3^(1/2)*(2*(-(1/4)*(4+(4*I)*3^(1/2))^(1/3)-1/(4+(4*I)*3^(1/2))^(1/3)+((1/2)*I)*3^(1/2)*((1/2)*(4+(4*I)*3^(1/2))^(1/3)-2/(4+(4*I)*3^(1/2))^(1/3)))^2+(1/4)*(4+(4*I)*3^(1/2))^(1/3)+1/(4+(4*I)*3^(1/2))^(1/3)-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*5^(1/2))^(1/2)))+Pi+2*Pi*_Z9

(4)

``


​​​​​​​Download Question_for_maple_primes.mw

Hi 

how can I find e^(-x) with respect to x in this relation

e^x (1 + sqrt(1 + e^(-2 x))) - sinh^(-1)(e^(-x))=x

This worksheet attempts to implement figures in Section 3 of the book "Indra's pearls" by Mumford, Series and Wright using the  command complexplot.

The worksheet seems to display Figure 3.1 on page 63 accurately but fails to correctly display Figure 3.4 on page 67.

Can complexplot be coded to accurately display this figure?

Indras_pearls_spirals.mw

Hi all,

 

I need to compute all roots of a polynomial equation for geometric reasons. I do want accuracy but more important is speedy calculations. I know fsolve works pretty well, but I process the polynomials on my own first. Does the roots command work better? What about solvetools. Any and all thoughts welcome.

Note I need to compute all roots.

While solving an exercise in class, I ran into the following interesting solution of a transcendental equation.  It was not intentionally designed to be like this.

restart;
eq := 2*exp(-2*t) + 4*t = 127:
fsolve(eq, t=0..infinity);
                         31.75000000

The solution looks like a rational number while it was expected to be transcendental.  Let's increase the number of digits:

Digits := 20:
fsolve(eq, t=0..infinity);
Digits := 10:
                     31.750000000000000000

Let's make it even more accurate:

Digits := 29:
fsolve(eq, t=0..infinity);
Digits := 10:
                 31.750000000000000000000000000

And even more:

Digits := 40:
fsolve(eq, t=0..infinity);
Digits := 10:
           31.74999999999999999999999999986778814353

Is there a deep reason why the solution is so close to being a rational or is it just a coincidence?

 

I want to estimate numerically the value of P (that is the probability that f exceeds the value 12 when x, y and z are uniformly distributed within the box [-Pi, Pi]3).

restart
f := sin(x)+7*sin(y)^2+0.1*z^4*sin(x);
Omega := [x, y, z] =~ [(-Pi..Pi)$3]:
                                2        4       
               sin(x) + 7 sin(y)  + 0.1 z  sin(x)


h := Heaviside(f-12):
P := Int(h, Omega);


Here is a simple Monte Carlo estimation of P.

f_MC  := x -> sin(x[1])+7*sin(x[2])^2+0.1*x[3]^4*sin(x[1]); 
h_MC  := x -> Heaviside(f_MC(x) - 12);
omega := -Pi, Pi;
                         
P_MC := proc(N)
  local Z := Statistics:-Sample(Uniform(omega), [N, 3]):
  local F := Vector(N, n -> h_MC(Z[n])):
  local K := add(F):
  local P := evalf(add(F)/N):
  local q := Statistics:-Quantile(Normal(0, 1), 0.005, numeric):
  local e := -q*sqrt(P*(1-P)/N):
  printf("A bilateral 99%% confidence interval that Prob(f > 12) is %1.3e +/- %1.2e\n", P, e);
end proc:

P_MC(10^6)
A bilateral 99% confidence interval that Prob(f > 12) is 1.643e-02 +/- 3.27e-04

 

I was hoping to get a value for P using  evalf/Int with some method.
But I didn't succeed with any of the methods for multiple integration:

  • The following command returns 0 for n=1 and 2 and Int(h, Omega) if n >=3
    evalf( Int(h, Omega, 'epsilon=1e-n', 'method=_MonteCarlo') );
    

     

  • And all my attempts with methods from the Cuba library have resulted in an unevaluated Int(h, Omega) integral. 
     

Could you help me to estimate P using  evalf/Int ?
TIA

Hi,
Can anyone tell me what's going wrong with int(Heaviside(f-1/2), x=0..1, y=0..1); ?
 

restart:

f := x*y:

JH := int(Heaviside(f-1/2), x=0..1, y=0..1);  #???
                               1
                               -
                               4

 JP := int(piecewise(x*y>1/2, 1, 0), x=0..1, y=0..1); 
                          1   1      
                          - - - ln(2)
                          2   2      

# integrate "1" over the domain where f > 1/2

S := solve(f=1/2, x):
JS := int(1, x=S..1, y=1/2..1);
                          1   1      
                          - - - ln(2)
                          2   2      

Thanks in advance
 

При использовании «объединения» нумерация не сохраняется. Непонятно, по каким алгоритмам «объединение» применяется к тому или иному месту. Почему sistema [1] не равно GRAN [1]? Как я могу это исправить?

PS Прошу прощения за грамматические ошибки, английский плохо знаю

1. mws
 

рестарт;

 

 

B:=matrix([[1,        0,        1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0],
[-1,        -1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0],
[0,        0,        -1,        0,        -1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0],
[0,        1,        0,        1,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0],
[0,        0,        0,        0,        1,        1,        0,        1,        0,        0,        0,        0,        0,        0,        0,        0],
[0,        0,        0,        -1,        0,        -1,        -1,        0,        0,        0,        0,        0,        0,        0,        0,        0],
[0,        0,        0,        0,        0,        0,        1,        0,        1,        0,        0,        0,        0,        0,        0,        0],
[0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1,        0,        0,        0,        0,        0,        0],
[0,        0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1,        -1,        0,        0,        0,        0],
[0,        0,        0,        0,        0,        0,        0,        0,        0,        1,        1,        0,        1,        0,        0,        0],
[0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        1,        0,        1,        0,        0],
[0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1,        0],
[0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        -1,        0,        -1],
[0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        0,        1,        1]
]):

E:=16:V:=14;

V: = 14

(1)

G:=2*E; êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé

G: = 32

(2)

l:=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]:

 

for i to E do
De[i]:=-diff(phi[i](s[i]),s[i]$2)=He*phi[i](s[i]):  Äó âèäà -(diff(phi[i](s[i]), `$`(s[i], 2))) = H[e]*phi[i](s[i])
od:

for i to E do
FSR[i]:=subs(s[i]=x,dsolve(De[i],phi[i](s[i]),output=basis)):  Îáùèå ðåøåíèÿ
od:

for i to E do
OBCHEE_RECHIE[i]:=unapply(C[i+i-1]*FSR[i][2]+C[i+i]*FSR[i][1],x): od:

 

for i to E do
PROIZ:=diff(OBCHEE_RECHIE[i](x),x):
PROIZ_OB_RECH[i]:=unapply(PROIZ,x):od:

 

×òåíèå ìàòðèöû èíöèäåíòíîñòè

i0:=1:i1:=1:z:=1:y:=1:

for i from 1 to V do
 y:=1: z:=1:
  for j from 1 to E do
   if B[i,j]=1 then
    x[z]:=j: z:=z+1:
   fi:

   if B[i,j]=-1 then
    x[y]:=j:
    y:=y+1:
   fi:

  od;

  if z>=2 then
   v0[i0]:=[seq(x[s],s=1..z-1)]:
   i0:=i0+1:
  fi:

  if y>=2 then
   v1[i1]:=[seq(x[s],s=1..y-1)]:
   i1:=i1+1:
  fi:
od:

v0:=convert(v0,list):

v1:=convert(v1,list):

 

Ïîäñ÷åò êîëè÷åñòâà ãðàíè÷íûõ óñëîâèé òèïà f(0)

number0:=0:

for i to i0-1 do
if nops(v0[i])=2 then number0:=number0+2; fi:
if nops(v0[i])=3 then number0:=number0+4; fi:
od:

number0:=number0/2; #êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé òèïà f(0)

number0 := 9

(3)

 

Ïîäñ÷åò êîëè÷åñòâà ãðàíè÷íûõ óñëîâèé òèïà f(1)

number1:=0:

for i to i1-1 do
if nops(v1[i])=2 then number1:=number1+2; fi:
if nops(v1[i])=3 then number1:=number1+4; fi:
od:

number1:=number1/2; #êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé òèïà f(1)

number1 := 9

(4)

 

Êîëè÷åñòâî ãðàíè÷íûõ óñëîâèé ñ ïðîèçâîäíûìè

GP:=i0-1+i1-1;

GP := 14

(5)

 

ÍÓËÅÂÛÅ ÓÑËÎÂÈß

i:=1:

while i<number0+1 do
for j to i0-1 do
if nops(v0[j])=2 then
GRAN[i]:=OBCHEE_RECHIE[v0[j,1]](0)-OBCHEE_RECHIE[v0[j,2]](0)=0;
i:=i+1;
fi;
if nops(v0[j])=3 then
GRAN[i]:=OBCHEE_RECHIE[v0[j,1]](0)-OBCHEE_RECHIE[v0[j,2]](0)=0;
GRAN[i+1]:=OBCHEE_RECHIE[v0[j,2]](0)-OBCHEE_RECHIE[v0[j,3]](0)=0;
i:=i+2;
fi;
od; od;

 

ÅÄÈÍÈ×ÍÛÅ ÓÑËÎÂÈß (ÈËÈ îò l)

i:=number0+1:

while i<number0+number1+1 do
for j to i1-1 do
if nops(v1[j])=2 then
GRAN[i]:=OBCHEE_RECHIE[v1[j,1]](l[v1[j,1]])-OBCHEE_RECHIE[v1[j,2]](l[v1[j,2]])=0;
i:=i+1;
fi;
if nops(v1[j])=3 then
GRAN[i]:=OBCHEE_RECHIE[v1[j,1]](l[v1[j,1]])-OBCHEE_RECHIE[v1[j,2]](l[v1[j,2]])=0;
GRAN[i+1]:=OBCHEE_RECHIE[v1[j,2]](l[v1[j,2]])-OBCHEE_RECHIE[v1[j,3]](l[v1[j,3]])=0;
i:=i+2;
fi;
od; od;

 

ÍÓËÅÂÛÅ ÏÐÎÈÇÂÎÄÍÛÅ

i:=number0+number1+1:

while i<number0+number1+nops(v0) do
 for j to nops(v0) do
  for y from 1 to nops(v0[j]) do
   x[y]:=PROIZ_OB_RECH[v0[j,y]](0);
  od;
  m:='m';
  GRAN[i]:=sum(x[m],m=1..nops(v0[j]));
  i:=i+1;
 od;
od;

 

ÍÅÍÓËÅÂÛÅ ÏÐÎÈÇÂÎÄÍÛÅ

i: = число0 + число1 + nops (v0) +1:

в то время как i <G + 1 сделать
 для j до nops (v1) сделать
  для y от 1 до nops (v1 [j]) сделать
   x [y]: = PROIZ_OB_RECH [v1 [j, y]] (l [v1 [j, y]]);
  od;
  m: = 'm';
  ГРАН [i]: = сумма (x [m], m = 1..nops (v1 [j]));
  я: = я + 1;
 od;
od;

 

 

 

новогодний

sistema: = {}:

новенькие

время: = {}:

 

для я от 2 до G делаю

  sistema: = sistema union {GRAN [i]}:

od:

для я от 2 до G делаю

  peremenie: = peremenie union {C [i]}:

od:

 

коэфф: = решить (система, изменение):

коэфф:

 

система [1];

C[2]*He^(1/2)+C[6]*He^(1/2)

(6)

ГРАН [1];

C[1]-C[5] = 0

(7)

 

urav: = subs (koeff, GRAN [1]):

uravnenie: = collect (numer (lhs (normal (urav))), {He, C [1]}):

uravn: = remove (has,%, C [1]):

uravnenie_sobs_chisla: = evalf (algsubs (He = x, uravn)):

ВЕСЕЛЫЕ: = неприменить (uravnenie_sobs_chisla, x):

 

 

 

 

 

 

 

 

 

 

 

 


 

Скачать 1.mws

 

 

Initially I have a system of w(x,y,t) and f(x,y,t). I have a set of two partial differential equations with this system. Later on, the system is modified into w(x,y,t,z) andf(x,y,t,z) where x and z are related due to the presence of boundary layers. Because of this, the partial differential expressions with respect to x has to change.

For example, initially: diff(w(x,y,t),x)=diff(w(x,y,t),x)
Later on, when the system gets modified in the presence of boundary layers on application of chain rule: diff(w(x,y,t,z),x)=diff(w(x,y,t,z),x)+diff(w(x,y,t,z),z)*diff(z,x)

This change has to happen for all higher order derivatives of x. In my case, I have upto 4th order derivative in x. How do I achieve these changes in the expressions in Maple in an elegant manner?

Good day everyone. I need to calculate series of the function given above. But I can not find result. It writes "Error, (in series/function) improper op or subscript selector". How can I fix this error? Please help me.

The detailed file has been attached above.
 

Ek4:=sqrt((Ea^2*Eb^2-Eab^2*X5^2)*Ds);

((((1/2)*k((1/2)*k^2/m2+X2)^2/m1((1/2)*k^2/m2+X2)+X1((1/2)*k^2/m2+X2))*((1/2)*k((1/2)*k^2/m2+X1)^2/m2((1/2)*k^2/m2+X1)+X2((1/2)*k^2/m2+X1))-((1/2)*k((1/2)*k^2/m2+X1)^2/m1((1/2)*k^2/m2+X1)+X2((1/2)*k^2/m2+X1))*X5^2)*(((1/2)*k((1/2)*k^2/m2+X2)^2/m1((1/2)*k^2/m2+X2)+X1((1/2)*k^2/m2+X2)-(1/2)*k((1/2)*k^2/m2+X1)^2/m2((1/2)*k^2/m2+X1)-X2((1/2)*k^2/m2+X1))^2+4*((1/2)*k((1/2)*k^2/m2+X1)^2/m1((1/2)*k^2/m2+X1)+X2((1/2)*k^2/m2+X1))^(1/2)*X5^2))^(1/2)

(5)

series(Ek4,k=0,4);

Error, (in series/function) improper op or subscript selector

 

series(sqrt(Ek4),k=0,4);

Error, (in series/function) improper op or subscript selector

 


 

Download function.mwfunction.mw

First 183 184 185 186 187 188 189 Last Page 185 of 2236