Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

In LPSolve, I have solutions returned in matrix form that contain elements that are negligible (values close to zero).

Is there a simple way to convert and reduce these values to zero in the matrix (rather than return the exact values)?

 

Thanks! 

Is there a way that I can obtain a plot of a set of points like {(2,4),(3,5),(4,7),(5,8),(6,11)} in the domain of the set of positive integers. And the codomain is also the set of positive integers?

And after that is it possible to obtain a polynomial interpolation for three of the points say (2,4),(3,5) and (4,7)?

Thanks a lot in advance.

Hello,
How to find the points indicated in the graph of the following function:
(1.25 * y-sqrt (abs (x))) ^ 2 + x ^ 2-1,

I have used the Taks: the Second Derivative Test. Without results, as I show below:

Heart_Critical_Points_and_the_Second_Derivative_Test.mw
 

``

 

Critical Points and the Second Derivative Test

Objective Function f

(1.25*y-sqrt(abs(x)))^2+x^2-1

(1.25*y-abs(x)^(1/2))^2+x^2-1

(1)

smartplot[x, y]((1.25*y-sqrt(abs(x)))^2+x^2-1 = 0)

 

 

 

List of Independent Variables

v := [x, y]

[x, y]

(2)

Equations Nabla(f) = 0

convert(Student[MultivariateCalculus][Gradient]((1.25*y-abs(x)^(1/2))^2+x^2-1, [x, y]), list)

[-(1.25*y-abs(x)^(1/2))*abs(1, x)/abs(x)^(1/2)+2*x, 3.1250*y-2.50*abs(x)^(1/2)]

(3)

Critical Points

temp := remove(has, solve([-(1.25*y-abs(x)^(1/2))*abs(1, x)/abs(x)^(1/2)+2*x, 3.1250*y-2.50*abs(x)^(1/2)], v, Explicit), I); convert({seq(eval(v, temp[k]), k = 1 .. nops(temp))}, list)

[]

(4)

Second Derivative Test

Student[MultivariateCalculus][SecondDerivativeTest]((1.25*y-abs(x)^(1/2))^2+x^2-1, v = [])

LocalMin = [], LocalMax = [], Saddle = []

(5)

Hessians and their Eigenvalues

Temp := [Student[MultivariateCalculus][SecondDerivativeTest]((1.25*y-abs(x)^(1/2))^2+x^2-1, v = [], output = hessian)]; for k to nops(Temp) do Temp[k], convert(LinearAlgebra[Eigenvalues](Temp[k]), list) end do

Error, (in LinearAlgebra:-Eigenvalues) expecting either Matrices of rationals, rational functions, radical functions, algebraic numbers, or algebraic functions, or Matrices of complex(numeric) values

 
 

 

``


 

Download Heart_Critical_Points_and_the_Second_Derivative_Test.mw

 

 

 

Hey. I can't seem to implement the following recursive (piecewise) function:

f:=n->piecewise(n=0,1,n>=1,sum(f(k),k=0..n-1))

This doesn't work..How do I make it work? :( 

Hi

II ve managed to build an expression with one variable 
I me trying to plot this expression on a defined range but maple doesn t not let me.

How do I manage to plot this expression ?

If you have any advise on how to improve my code I m open to comments 

 

Thanks a lot in advance
 

restart


#data

`ϵc1` := 2.1*10^(-3);

0.2100000000e-2

(1)

`ϵcu1` := 3.5*10^(-3):

Ecm := 31000:

fcm := 25:

Fy := 500:

Es := 200000:

#geometry

As := 1885:

b := 250:

d := 450:


#coefficients

eta := epsilon/`ϵc1`:

k := 1.05*Ecm*`ϵc1`/fcm:

NULL


#formula

 

NULL

`σc` := proc (epsilon) options operator, arrow; fcm*(k*epsilon/`ϵc1`-epsilon^2/`ϵc1`^2)/(1+(k-2)*epsilon/`ϵc1`) end proc;

proc (epsilon) options operator, arrow; fcm*(k*epsilon/`ϵc1`-epsilon^2/`ϵc1`^2)/(1+(k-2)*epsilon/`ϵc1`) end proc

(2)

plot(`σc`, 0 .. `ϵcu1`);

 

NULL

#Pressure as a function of y (y=`ϵc`*y/x) :

`σc` := proc (y) options operator, arrow; fcm*(k*`ϵc`*y/(x*`ϵc1`)-`ϵc`^2*y^2/(x^2*`ϵc1`^2))/(1+(k-2)*`ϵc`*y/(x*`ϵc1`)) end proc;

proc (y) options operator, arrow; fcm*(k*`ϵc`*y/(x*`ϵc1`)-`ϵc`^2*y^2/(x^2*`ϵc1`^2))/(1+(k-2)*`ϵc`*y/(x*`ϵc1`)) end proc

(3)

`assuming`([int(`&sigma;c`, 0 .. x)], [0 <= x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

int(25*(1302.000000*`&varepsilon;c`*x/x-226757.3696*`&varepsilon;c`^2*x^2/x^2)/(1+349.6190476*`&varepsilon;c`*x/x), x = 0 .. x)

(4)

C := `assuming`([int(fcm*(k*`&varepsilon;c`*s/(x*`&varepsilon;c1`)-(`&varepsilon;c`*s/(x*`&varepsilon;c1`))^2)*b/(1+(k-2)*`&varepsilon;c`*s/(x*`&varepsilon;c1`)), s = 0 .. x)], [0 < x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

-0.7487980799e-19*x*(0.2706771684e26*`&varepsilon;c`^2+0.1331955800e22*ln(874047619.*`&varepsilon;c`+2500000.)-0.1962210817e23-0.4656771182e24*`&varepsilon;c`)/`&varepsilon;c`

(5)

T := `assuming`([(d-x)*`&varepsilon;c`*Es*As/x], [0 < x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

377000000*(450-x)*`&varepsilon;c`/x

(6)

``

x := `assuming`([solve(C = T, x)], [0 < x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

868.0577815*(0.2900000000e12*`&varepsilon;c`+(-0.7297483689e24*`&varepsilon;c`^2+0.1400157114e23*`&varepsilon;c`-0.4004807874e20*ln(874047619.*`&varepsilon;c`+2500000.)+0.5899803379e21)^(1/2))*`&varepsilon;c`/(0.2706771684e13*`&varepsilon;c`^2+133195580.*ln(874047619.*`&varepsilon;c`+2500000.)-0.4656771182e11*`&varepsilon;c`-1962210817.), -868.0577815*(-0.2900000000e12*`&varepsilon;c`+(-0.7297483689e24*`&varepsilon;c`^2+0.1400157114e23*`&varepsilon;c`-0.4004807874e20*ln(874047619.*`&varepsilon;c`+2500000.)+0.5899803379e21)^(1/2))*`&varepsilon;c`/(0.2706771684e13*`&varepsilon;c`^2+133195580.*ln(874047619.*`&varepsilon;c`+2500000.)-0.4656771182e11*`&varepsilon;c`-1962210817.)

(7)

``

``

``

l

(8)

plot(l, `&varepsilon;c` = 0 .. 0.34e-2)

Error, (in plot) expected a range but received `&varepsilon;c` = 0 .. 0.34e-2

 

``

NULL


 

Download HW1_-_EC2_strain-pressure_graph.mw
 

restart


#data

`&varepsilon;c1` := 2.1*10^(-3);

0.2100000000e-2

(1)

`&varepsilon;cu1` := 3.5*10^(-3):

Ecm := 31000:

fcm := 25:

Fy := 500:

Es := 200000:

#geometry

As := 1885:

b := 250:

d := 450:


#coefficients

eta := epsilon/`&varepsilon;c1`:

k := 1.05*Ecm*`&varepsilon;c1`/fcm:

NULL


#formula

 

NULL

`&sigma;c` := proc (epsilon) options operator, arrow; fcm*(k*epsilon/`&varepsilon;c1`-epsilon^2/`&varepsilon;c1`^2)/(1+(k-2)*epsilon/`&varepsilon;c1`) end proc;

proc (epsilon) options operator, arrow; fcm*(k*epsilon/`&varepsilon;c1`-epsilon^2/`&varepsilon;c1`^2)/(1+(k-2)*epsilon/`&varepsilon;c1`) end proc

(2)

plot(`&sigma;c`, 0 .. `&varepsilon;cu1`);

 

NULL

#Pressure as a function of y (y=`&varepsilon;c`*y/x) :

`&sigma;c` := proc (y) options operator, arrow; fcm*(k*`&varepsilon;c`*y/(x*`&varepsilon;c1`)-`&varepsilon;c`^2*y^2/(x^2*`&varepsilon;c1`^2))/(1+(k-2)*`&varepsilon;c`*y/(x*`&varepsilon;c1`)) end proc;

proc (y) options operator, arrow; fcm*(k*`&varepsilon;c`*y/(x*`&varepsilon;c1`)-`&varepsilon;c`^2*y^2/(x^2*`&varepsilon;c1`^2))/(1+(k-2)*`&varepsilon;c`*y/(x*`&varepsilon;c1`)) end proc

(3)

`assuming`([int(`&sigma;c`, 0 .. x)], [0 <= x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

int(25*(1302.000000*`&varepsilon;c`*x/x-226757.3696*`&varepsilon;c`^2*x^2/x^2)/(1+349.6190476*`&varepsilon;c`*x/x), x = 0 .. x)

(4)

C := `assuming`([int(fcm*(k*`&varepsilon;c`*s/(x*`&varepsilon;c1`)-(`&varepsilon;c`*s/(x*`&varepsilon;c1`))^2)*b/(1+(k-2)*`&varepsilon;c`*s/(x*`&varepsilon;c1`)), s = 0 .. x)], [0 < x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

-0.7487980799e-19*x*(0.2706771684e26*`&varepsilon;c`^2+0.1331955800e22*ln(874047619.*`&varepsilon;c`+2500000.)-0.1962210817e23-0.4656771182e24*`&varepsilon;c`)/`&varepsilon;c`

(5)

T := `assuming`([(d-x)*`&varepsilon;c`*Es*As/x], [0 < x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

377000000*(450-x)*`&varepsilon;c`/x

(6)

``

x := `assuming`([solve(C = T, x)], [0 < x and x <= (1/2)*d, 0 <= `&varepsilon;c` and `&varepsilon;c` <= 0.35e-2]);

868.0577815*(0.2900000000e12*`&varepsilon;c`+(-0.7297483689e24*`&varepsilon;c`^2+0.1400157114e23*`&varepsilon;c`-0.4004807874e20*ln(874047619.*`&varepsilon;c`+2500000.)+0.5899803379e21)^(1/2))*`&varepsilon;c`/(0.2706771684e13*`&varepsilon;c`^2+133195580.*ln(874047619.*`&varepsilon;c`+2500000.)-0.4656771182e11*`&varepsilon;c`-1962210817.), -868.0577815*(-0.2900000000e12*`&varepsilon;c`+(-0.7297483689e24*`&varepsilon;c`^2+0.1400157114e23*`&varepsilon;c`-0.4004807874e20*ln(874047619.*`&varepsilon;c`+2500000.)+0.5899803379e21)^(1/2))*`&varepsilon;c`/(0.2706771684e13*`&varepsilon;c`^2+133195580.*ln(874047619.*`&varepsilon;c`+2500000.)-0.4656771182e11*`&varepsilon;c`-1962210817.)

(7)

``

``

``

l

(8)

plot(l, `&varepsilon;c` = 0 .. 0.34e-2)

Error, (in plot) expected a range but received `&varepsilon;c` = 0 .. 0.34e-2

 

``

NULL


 

Download HW1_-_EC2_strain-pressure_graph.mw

 

 

This is my first time in this forum, so I hope I use the correct conventions. If not please notice me. 

  1. When a light body orbits a heavy body under the influence of gravity (e.g. a planet around the Sun), Newton’s laws show that the orbit is restricted to a two-dimensional plane and is given by the differential equation

    d2/d(φ)2(1/r(φ)) + 1/r(φ) = GM/h2

    Here, (r, φ) is the path of the light body in polar coordinates, M is the mass of the heavy body, G is the gravitational constant, and h is a constant related to the angular velocity of the light body (h = r2φ ̇). The heavy body can be considered to be approximately stationary and located at the origin.

    Use Maple to solve this differential equation numerically, taking M = 1, G = 1, h = 1 with initial conditions

    r(0)=2/3, r′(0)=dr/dφ (0) = 0

    Using polar coordinates, create a plot of the orbit (r(φ), φ) for
    0 ≤ φ < 2π. You should observe a perfect ellipse.

  2. Since I am not a frequent maple user, I hope somebody can help me here

0=(1−p)π+φV+δR−(μ+λ+ϑ)S

0=pπ+ϑS−(μ+ϵλ+φ)V

0=ρλS+ρϵλV+(1−q)ηI−(μ+β+χ)C

0=(1−ρ)λS+(1−ρ)ϵλV+χC−(μ+α+η)I

0=βC+qηI−(μ+δ)R

Anybody know how to solve using coding for all the variable S,V,C,I,R

 I am trying to solve 2 equations in maple:

 1/  solve({1<x or x<3 or x>5});

 {x=x}    solution is correct

 2/  solve({1<x or x<3 or x<5});

 {x<5}    solution is wrong

 How do I have solution correct is {x=x} in Maple?

 Please teach me about this.

 Thank you very much!

Hi there,

Relatively new to maple (and programming all together). I am looking to try and make an if statement that performs several checks but I do not know which order to put them in.

 

Essentially I am trying to start out with i=1, max(Q)>0 and then perform a function, then add 1 to i and run it back through the test again. When my function changes from max(Q)>0 to max(Q)<=0 then I will have found a solution but only if i<330.

I am also unsure if I should put the test for i>330 before or after max(Q) test.


Thank you for any help

 

 

I think that I am probably making this more complicated than it needs to be, but I'm fairly certain that the way that I am doing this is possible within Maple. 

 

Currently I have this line of code

>implicitplot3d({2*sqrt(2)*x-2*z+sqrt(2) = 0, 2*sqrt(2)*x+2*z-sqrt(2) = 0, 2*sqrt(2)*y-2*z-sqrt(2) = 0, 2*sqrt(2)*y+2*z+sqrt(2) = 0}, x = -2 .. 2, y = -2 .. 2, z = -2 .. 2)

 

So these equations create planes that intersect creating a tetrahedron. The problem I'm running into is that I need to "trim" the extra bits of the planes outside of the tetrahedron. The idea I have right now is constraining each plane by 3 equations which would turn the planes into triangles. I think this will work but I'm not sure how to constrain each individual plane with different equations AND plot them on the same graph. Any direction here would be greatly appreciated. I would prefer to stick with using implicitplot3d and avoid any special plotting tools. 

 

Thanks for any help!

The real function y(x) is defined implicitly by the equation:

ln(1+x)*y) + e^((x^2)*(y^2)) = x + cos(x);

How can I find y(0) = 1 and the values of the first six derivatives y(k)(0), k=1, 2,..6 at x=0 to show the Taylorseries about x=0?

(I started by defining p:= ln(1+x)*y) + e^((x^2)*(y^2)) - x - cos(x), but that went wrong. 

 I want to solve PDE by method of lines , i get system of ODEs , I want  to solve this system by rk4 in package can someone help me please 

MOL.mw

I have experimental data that in some respect can be modelled by an asymmetric triangle function.  In the link below is my worsheet examining the effect of making the asymmetric triangle symmetric.  The frequency content, 2*pi*k/T, for both triangles is still the same.  Of course the Fourier coefficients will be different, but it appears the convergence is superior for the symmetric triangle.

I could do this with my experimental data by mirroring it about t=0.  Is this a mistake?  If I can do the symmetric case I think I can fit the data with much fewer terms.  If anyone has experience on these matters I would appreciated your comments.

discontinuty_Fourier_representation.mw

Hi.... I'd want to numerically solve a system of  n  polynomial equations of degree 2 with respect to n unknowns. It seems to me that there is a software in Maple (which deals only with the equations of degree 2) that solves this problem. I cannot find it anymore. Do you know it ? Thanks in advance.

Below is my attempt to evaluate an integral using the substition x=t/T.  MAPLE seems to be upset with my integration limits.  I do not know what I am doing wrong.

(int((1+t/T)*exp(-I*(2*Pi*n*t/T)), t = -T .. 0)+int((1-t/T)*exp(-I*(2*Pi*n*t/T)), t = 0 .. T))/T"(=)"-(1/2)*(cos(2*Pi*n)-1)/(n^2*Pi^2)

x := t/Tau;

1/Tau

(1)

1/2*(int((1+x)*exp(-(I*2)*Pi*n*x), x = -1 .. 0)+int((1-x)*exp(-(I*2)*Pi*n*x), x = 0 .. 1))

Error, (in int) integration range or variable must be specified in the second argument, got t/Tau = -1 .. 0

 

``


 

Download integration_error.mw

First 876 877 878 879 880 881 882 Last Page 878 of 2215