MaplePrimes Questions

Dear all,
Greetings!
I have made a code that solves a nonlinear system of equations by using Newton's Method. I am facing a problem in printing the Jacobian at each iteration. It only prints its lable not the Jacobian matrix itself. Please help me in this regard.
 

"restart;  iter:=5;  f[1](x,y):=3 x^(2)-y^(2);  f[2](x,y):=3 x^()*y^(2)-x^(3)-1;"

5

 

proc (x, y) options operator, arrow; 3*x^2-y^2 end proc

 

proc (x, y) options operator, arrow; 3*x*y^2-x^3-1 end proc

(1)

var := x, y

x, y

(2)

pointt := [x[n], y[n]]

[x[n], y[n]]

(3)

NULL

NULL

NULL

x[0] := 1; y[0] := 1

1

 

1

(4)

for n from 0 to iter do print('f1' = f[1](x[n], y[n]), 'f[2]' = f[2](x[n], y[n])); print('J'*[n] = J[n]); J[n] := Student[MultivariateCalculus][Jacobian]([f[1](x, y), f[2](x, y)], [var] = pointt, output = matrix); sol[n] := eval((Vector(2, {(1) = x[n], (2) = y[n]}))-1/J[n].(Vector(2, {(1) = f[1](x[n], y[n]), (2) = f[2](x[n], y[n])}))); x[n+1] := evalf(sol[n][1]); y[n+1] := evalf(sol[n][2]); print(x[n+1], y[n+1]) end do

f1 = 2, f[2] = 1

 

J*[0] = J[0]

 

.6111111111, .8333333333

 

f1 = .4259259256, f[2] = 0.44924554e-1

 

J*[1] = J[1]

 

HFloat(0.5036590808700434), HFloat(0.8524944221287727)

 

f1 = HFloat(0.03427066946790058), f[2] = HFloat(-0.029666658033242088)

 

J*[2] = J[2]

 

HFloat(0.4999641210723523), HFloat(0.8660456363859079)

 

f1 = HFloat(-1.4267722412308892e-4), f[2] = HFloat(-1.2576398193964167e-6)

 

J*[3] = J[3]

 

HFloat(0.50000000001492), HFloat(0.8660254018170033)

 

f1 = HFloat(3.45245787514159e-9), f[2] = HFloat(-5.089167087746205e-9)

 

J*[4] = J[4]

 

HFloat(0.5), HFloat(0.8660254037844386)

 

f1 = HFloat(1.1102230246251565e-16), f[2] = HFloat(-2.220446049250313e-16)

 

J*[5] = J[5]

 

HFloat(0.5), HFloat(0.8660254037844387)

(5)

NULL

NULL


 

Download q1nwtnnonlinearsys.mw

the print output is too ugly, any help in making it more elegant would also be appreciated .

Am trying to integrat f(x)=x3/2 from 1-2 but can't seem to set it up properly.  

 

Hello to everyone. Thanks in advance for everyone's answers. I'm new to Maple. Enter key does not react. Any ideas?

Creat a procedure that descritises a given expression of f(x) or function f of one variable over a closed interval range [a,b] using N€ N points.
The output of the procedure should be a list containing the ordered pairs of points in the discretisation.
Add an argument to the procedure to allow for the optional display of the 2d plot of the specified domain comparing the original expression or function and its descritised  form with the points connected by straight lines. These should be displayed on the same plot.

I am trying to make a contour plot of the function f(x,y):=exp(-(x2+y2)/3)cos(2xy)  

Does anyone understand this behavior? Why under some situations the exponential is not explicitly calculated by maple?

issue_matrix_exp.mw

I'm on linux x86_64, using Maple 2017.3

thanks.
 

Code:

restart:

H:=Matrix(4,4, 0):
H[2,3]:=a*exp(I*(b*x+phi)):
H[3,2]:=a*exp(-I*(b*x+phi)):
H;

LinearAlgebra:-MatrixExponential(-I*H); #result as I would expect

H2:=subs(a=0.1, b=0.3, phi=0.1, H); #substitute a few variables

LinearAlgebra:-MatrixExponential(-I*H2); #why does this not work?

H3:=subs(x=0.35, H2); #substitute numerical value for x as well

LinearAlgebra:-MatrixExponential(-I*H3); #now get a result

I wish to make a plot of the Bessel functions, J0(x) and J1(x) on the interval x=0 to 10.  

DEAR,

Working on my maple worksheet, suddenly the PC was shut down because of outage. Now I cant open my worksheet. When I open my file, Text format Choice window emerges without success in opennig the file withot regard which item selected. 

Could anybody help me open my worksheet.

Download MyWorkSheet.mw

 

Hi

Determine the extrema corresponds to a local minimum, maximum or
neither.

 

restart;
with(Optimization);

obj := 2*x^2+2*x*y+3*y^2;
  cts := [x+y = 2];
    Minimize(obj, cts);

    Maximize(obj, cts);

Maple display that there is no maximum, i d'ont understand why the maximum does not exist.

Many think

 

 

 

Hi, I'd like to use something to compare expressions, so I thought evalb or verify.

I'd like to evaluate things like the identity,

logb(y) = y ∙ logb(x)

However using either I get:

> verify(2*log(x), log(x^2));

                             false
> evalb(2*log(x) = log(x^2));

                             false
now I thought maybe conditions might be different but as none are specified they should be the same in any domain. 

Not sure what is wrong or which comand is more suitable.

 

 

dear sir i want to plot a graph for different values of h(z) by applying do loop, hear is my codes

In K1 it should take first h(z)

In K2 it should take second h(z)

IN K3 it should take third h(z) 

restart:
h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L2)*(z - d2 - L2))):
h:=z->1+(delta2/2):
K1:=((4/h(z)^4)-(sin(alpha)/F)-h(z)^2+Nb*h(z)^4):
K2:=((4/h(z)^4)-(sin(alpha)/F)-h(z)^2+Nb*h(z)^4):
K3:=((4/h(z)^4)+(cos(alpha)/F)+h(z)^2+Nb*h(z)^4):
lambda1:=Int(K1,z=0..0.2):
lambda2:=Int(K2,z=0.2..0.4):
lambda3:=Int(K3,z=0.4..0.6):
lambda:=(lmbda1+lambda2+lambda3):

F:=0.3:
L1:=0.2:
d1:=0.2:
d2:=0.2:
L2:=0.3:
alpha:=Pi/6:
plot( [seq(eval(lambda, Nb=j), j in [0.1,0.2,0.3])], delta2=0.02..0.1);
 

I want to stop the following loop when there is no more roots. how can i do this?

 

 

I mean the following Maple 2017.3 result

restart; with(Statistics):
X := RandomVariable(Geometric(1/3)):
Probability(sin(X) <= 1/2);
                            2839595/4782969

Mma 11.2 fails with it. It's unclear for me how Maple calculates the above result. Trying printlevel:=10:, I don't understand much. Also the result

solve({x >= 0, sin(x) <= 1/2}, [x], AllSolutions);
Warning, solutions may have been lost
  
[[x <= (1/6)*Pi, 0 <= x], [x <= 13*Pi*(1/6), 5*Pi*(1/6) <= x], [x <= 25*Pi*(1/6), 17*Pi*(1/6) <= x],
 [x = 29*Pi*(1/6)]]

does not encourage.

How can I find period of the following function with respect to p?
 

 

Thanks,

I am trying to recreate some plots from the research paper https://arxiv.org/pdf/0807.1597.pdf found on page 13 and 14, but so far I havn't really gotten anywhere. Would appreciate some help or hints so I can get further.

First 877 878 879 880 881 882 883 Last Page 879 of 2434