Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi all, I want to evaluate the integral G2. I am using the evalf command, but maple is unable to evaluate it. What am I missing here?

 

G2 := -.5*(int(Re(-(0.8823529412e-2*(-16.19435640-30.82287308*exp(-.2960360476-(1.*I)*theta)))*exp(.1480180238-(1.*I)*(.5*theta-0.6282080040e-1*ln(-1.*sin(-.3926990818+.5*theta)/sin(.3926990818+.5*theta))))*(-.5*cos(.3926990818+.5*theta)*sin(-.3926990818+.5*theta)+.5*sin(.3926990818+.5*theta)*cos(-.3926990818+.5*theta))/sqrt(-1.*sin(.3926990818+.5*theta)*sin(-.3926990818+.5*theta))-0.1764705882e-1*sqrt(-1.*sin(.3926990818+.5*theta)*sin(-.3926990818+.5*theta))*(1.017602550-3.872635115*exp(-.2960360476-(1.*I)*theta))*exp(.1480180238-(1.*I)*(.5*theta-0.6282080040e-1*ln(-1.*sin(-.3926990818+.5*theta)/sin(.3926990818+.5*theta))))-0.1764705882e-1*sqrt(-1.*sin(.3926990818+.5*theta)*sin(-.3926990818+.5*theta))*(-16.19435640-30.82287308*exp(-.2960360476-(1.*I)*theta))*(-0.6282080040e-1-(0.6282080040e-1*I)*(.5*cos(-.3926990818+.5*theta)/sin(.3926990818+.5*theta)+.5*sin(-.3926990818+.5*theta)*cos(.3926990818+.5*theta)/sin(.3926990818+.5*theta)^2)*sin(.3926990818+.5*theta)/sin(-.3926990818+.5*theta))*exp(.1480180238-(1.*I)*(.5*theta-0.6282080040e-1*ln(-1.*sin(-.3926990818+.5*theta)/sin(.3926990818+.5*theta)))))*(-.5-.5*cos(2.*theta))+.5*Im(-(0.8823529412e-2*(-16.19435640-30.82287308*exp(-.2960360476-(1.*I)*theta)))*exp(.1480180238-(1.*I)*(.5*theta-0.6282080040e-1*ln(-1.*sin(-.3926990818+.5*theta)/sin(.3926990818+.5*theta))))*(-.5*cos(.3926990818+.5*theta)*sin(-.3926990818+.5*theta)+.5*sin(.3926990818+.5*theta)*cos(-.3926990818+.5*theta))/sqrt(-1.*sin(.3926990818+.5*theta)*sin(-.3926990818+.5*theta))-0.1764705882e-1*sqrt(-1.*sin(.3926990818+.5*theta)*sin(-.3926990818+.5*theta))*(1.017602550-3.872635115*exp(-.2960360476-(1.*I)*theta))*exp(.1480180238-(1.*I)*(.5*theta-0.6282080040e-1*ln(-1.*sin(-.3926990818+.5*theta)/sin(.3926990818+.5*theta))))-0.1764705882e-1*sqrt(-1.*sin(.3926990818+.5*theta)*sin(-.3926990818+.5*theta))*(-16.19435640-30.82287308*exp(-.2960360476-(1.*I)*theta))*(-0.6282080040e-1-(0.6282080040e-1*I)*(.5*cos(-.3926990818+.5*theta)/sin(.3926990818+.5*theta)+.5*sin(-.3926990818+.5*theta)*cos(.3926990818+.5*theta)/sin(.3926990818+.5*theta)^2)*sin(.3926990818+.5*theta)/sin(-.3926990818+.5*theta))*exp(.1480180238-(1.*I)*(.5*theta-0.6282080040e-1*ln(-1.*sin(-.3926990818+.5*theta)/sin(.3926990818+.5*theta)))))*sin(2.*theta), theta = 0. .. .7853981635))

Hello, and thank you for your time!
I can´t seem to find the way to simplify the result of this vector´s norm. I need to find the final value of it.
Any idea to do it simpler?

I use indices of Table

6,6,3,3,3

but it return 3,6

how to keep [3,3,3,6,6]?

any other method for indices?

any non hash table which map value to value?

Why doesn't

f:=ln(s + 2)^2 + 2*polylog(2, -1 - s) + 2*polylog(2, (1 + s)/(s + 2))

simplify to zero assuming s>0?

I have this polynomial equation: (x-2)^2*(x-3)+epsilon =0, I want to draw a bifurcation diagram in the (epsilon , x) plane.

 

How to implement this in maple 2018?

 

Thanks!

 

Hello,
Anyone has an idea what is wrong with the following code procedure?
the result of u(x) should be a continuous function of x (and it is continuous when solved numerically)

THANKS IN ADVANCE,
Gil Soffer
 

restart;
Heaviside(0):=1:Heaviside(0.):=1:
dats:={s(x)=-Dt*(x+h/2)+st};
eqs:={diff(u(x),x)=Heaviside(sY-s(x))*s(x)/E+Heaviside(s(x)-sY)*(sY/E+(s(x)-sY)/Esec),
      u(-h/2)=y0};
sol0:=simplify(dsolve(subs(dats,eqs),u(x)));
sol1:=int(lhs(eqs[1]),x)=eval(student:-simpson(subs(x=_x,subs(dats,rhs(eqs[1]))),_x=-h/2..x,40))+y0:

dat1:={Dt=-0.1,Esec=1,E=3,sY=0.8,st=0.05,y0=5,h=10};
plot([subs(evalf(subs(dat1,sol0)),u(x)),subs(evalf(subs(dat1,sol1)),u(x))],x=-5..5,title=u(x),legend=[symbolic,numeric]);
plot(subs(subs(dat1,subs(dats,eqs[1])),diff(u(x),x)),x=-5..5,title=diff(u(x),x));


I solved this PDE by hand to verify Maple's solution. I think Maple solution is wrong. This PDE is the heat PDE on a bar (1D) with boundary coditions on both ends are function of time and zero initial conditions.

unassign('A,B,x,t,L,k,f');
pde := diff(u(x,t),t)= diff(u(x,t),x$2):
bc := u(0, t) = A(t), u(1, t) = B(t):
ic := u(x, 0) = 0:
sol1:=pdsolve([pde, ic, bc], u(x, t));

#now try when A(t)=sin(t),B(t)=t, use 20 terms for the sum
sol2:=simplify(subs([infinity=20,B(tau)=tau,A(tau)=sin(tau),A(0)=0,B(0)=0,A(t)=sin(t),B(t)=t],sol1)):
sol3:=simplify(value(subs(t=1,sol2))):
evalf(subs(x=0.5,sol3))

 

Also doing pdetest(sol1,pde); on the above solution does ot return zero as expected.

To verify more, I solved the same PDE again, but now using an explicit values for the boundary conditions A(t), B(t). Using A(t)=sin(t), B(t)=t. Then found the value again of the solution u at x=0.5 and t=1 like in the above, and it gives different value:

unassign('A,B,x,t,L,k,f');
pde := diff(u(x,t),t)= diff(u(x,t),x$2):
bc := u(0, t) = sin(t), u(1, t) = t:
ic := u(x, 0) = 0:
sol4:=pdsolve([pde, ic, bc], u(x, t));
sol5:=simplify(subs(infinity=20,sol4)):
sol6:=simplify(value(subs(t=1,sol5))):
evalf(subs(x=0.5,sol6))

Then I typed my hand solution into Maple and for the same values x=0.5, t=1 and same number of terms, I also get the same value 0.819. 

Full hand solution is long to post here, I post the final result.

I do not see at all where the function sin integral should come into play in this solution. 

Could some Maple expert please check to see what is going on with this solution to Maple? Here is my hand solution (final result)

Where in the above, f(x) is initial conditions (which is zero in the examples above), and L is length of the bar, which is 1 in the above examples, and k=1 also in the above examples.  You see, there is no Si function any where in the solution. Replacing in the above solution L=1,f=0,k=1,A=sin(t),B=t and evaluting the sum using 20 terms at x=0.5, t=1, gives 0.819... 

Using Maple 2019.1 and Physics version 370

 

Hello, the passage to the Slideshow in Maple makes me lose the structure of my document ( Sections;sub-sections,.). Is there a way to optimize this display? Thank you

Hi all

trying to find analytically sin(erf(t)) and cos(erf (t)) rather than numerically

 

How to get the only solution x = (1/6)*sqrt(114)*a of this equation?
restart;
with(Student:-MultivariateCalculus);
u := `<,>`(-(1/4)*a, -(1/12)*sqrt(3)*a, -x);
v := `<,>`(-(1/2)*a, (1/6)*sqrt(3)*a, (1/2)*x);
`assuming`([solve(Angle(u, v) = arccos(2*sqrt(26)*(1/13)), x)], [And(a > 0, x > 0)])

Experts,

 

I have a series as follows: 

b := (sum((x[i]-xbar)^3, i = 1 .. n))/(n*[(sum((x[i]-xbar)^2, i = 1 .. n))/(n-1)]^1.5)

(b is skewness of x)

Taking the derivatives:

 

c1:=diff(b, xbar);

c2:=diff(b, x[i]);
 

now I want to evaluate c1 and c2 with a matrix input:

 

x:=<<0.556960605000000>,<3.39039994000000>,<2.09005200300000>,<0.645104568000000>,<5.31340491600000>,<3.32743462200000>,<0.635452131000000>,<1.56878297000000>,<0.282764039000000>,<1.02862059900000>,<3.14927606700000>,<0.654644768000000>,<1.30502450500000>,<2.13887537900000>,<2.11803658900000>,<7.29488570500000>,<0.478693554000000>>

where xbar is the mean value of x

 

Can you please help me

 

Thanks

 

 

 

 

 

i have two expressions. S1 and S2 are functions of sigma and tau. but i need derivative of sigma and tau with respect to S1 and S2. what should i do ? could any one help?


 

restart

S1 := -4*sqrt(sigma1^2 + 4*tau^2)*tau^2/((sigma1 + sqrt(sigma1^2 + 4*tau^2))^2*(1 + 4*abs(tau/(sigma1 + sqrt(sigma1^2 + 4*tau^2)))^2))

-4*(sigma1^2+4*tau^2)^(1/2)*tau^2/((sigma1+(sigma1^2+4*tau^2)^(1/2))^2*(1+4*abs(tau/(sigma1+(sigma1^2+4*tau^2)^(1/2)))^2))

(1)

S2 := 4*sqrt(sigma1^2 + 4*tau^2)*tau^2/((-sigma1 + sqrt(sigma1^2 + 4*tau^2))^2*(1 + 4*abs(tau/(-sigma1 + sqrt(sigma1^2 + 4*tau^2)))^2))

4*(sigma1^2+4*tau^2)^(1/2)*tau^2/((-sigma1+(sigma1^2+4*tau^2)^(1/2))^2*(1+4*abs(tau/(-sigma1+(sigma1^2+4*tau^2)^(1/2)))^2))

(2)

 

 

 


 

Download chain_rule_derivative.mw

Hey guys im still quite new to maple so bear with me on this one. 

Im trying to make it so when i press a button an some mathcontainers are going though some if statements, and then printing out the answer.

 

Heres the code 

 

use DocumentTools in 

Do(indkomst = %MathContainer2);
Do(fradrag = %MathContainer4);

if indkomst <= 44000 then 
    
    Do(%MathContainer3 = 0.08*indkomst);

elif 44000 < 0.92*indkomst and indomst <= 44000+fradrag then
    
    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000));

elif 44000+fradrag < 0.92*indkomst and indkomst <= 467300 then

    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000) + 0.276*(0.92*indkomst - 44000 - fradrag));

elif 0.92*indkomst > 467300 then

    Do(%MathContainer3 = 0.08*indkomst + 0.0908*(0.92*indkomst - 44000) + 0.276*(0.92*indkomst - 44000 - fradrag) + 0.15*(0.92*indkomst - 467300));
    
end if;

end use; 
 

It correctly chooses what statement to use, but it just cant determine if its true or false, how do i fix this?

I'm trying to solve this to set of equations :

EQ1:=-1958143.922*k*wr+2468.8339*k^3*wr-0.9481118254e16*k^2-114000.8376*k^4:

EQ2 :=-1186578.220*R*k^2*wr-312683.0293*k^5-288960.9621*k^3*R:

using a loop for different value of R in the range this range (wr=0..10,k=0..10)

eqns:={EQ1,EQ2}:
for i from 1 by 1 to 101 do R:=(i-1):S:=fsolve(eqns,{k, wr},{wr=0..10,k=0..10}):v(i):=(subs(S,(wr)));w(i):=(subs(S,(k)))end do:

but i get this instead :

Error, invalid input: subs received fsolve({-312683.0293*k^5, -1958143.922*k*wr+2468.8339*k^3*wr-0.9481118254e16*k^2-114000.8376*k^4}, {k, wr}, {k = 0 .. 10, wr = 0 .. 10}), which is not valid for its 1st argument

is there another way to solves this equations more easly .

Hello guys, 

I have a probelm with computing an integral by maple. I dont know why maple cannot compute.

 

integral.mw

Thank you for your attention

Best

1 2 3 4 5 6 7 Last Page 1 of 1554