MaplePrimes Questions

Let a, b be arbitrary real parameters. I intend to compute something like: (with exact piecewise output) 

Optimization:-Maximize(8*x + 7*y, {5*y <= 6 - 9*b, -6*x - 4*y <= 8 - 5*a - 7*b, -4*x + 7*y <= -1 - 2*a - 7*b, -x + y <= 6 + 4*a - 5*b, 7*x + 5*y <= a + 4*b}, variables = {x, y}): # Error
Optimization:-Minimize((x - 1)^2 + (2*y - 1)^2, {x - 2*y <= 2*a - b + 1, x + 2*y <= a + b, 2*x - y <= a - b + 1}, variables = {x, y}): # Error

Unfortunately, these Maple codes are virtually invalid, and the relevant commands minimize, maximize, extrema, and Student[MultivariateCalculus][LagrangeMultipliers] do not support general inequality constraints. Is it possible to tackle these small-scale constrained parametric problems in Maple?

Quite often, Maple freezes, and the file cannot be saved, and Maple cannot be closed.

Did you get the problem ?

Can someone give me an example for using

linear regressor function from deep learning package

By passing one dependent variable say Y

And a set of independent variables say X

As a matrix say 

Can we be able to split data into train and test and use this linear regressor command on train and do validation

As I am not able to see some examples on the implementations using command kind help 

I run the following command.

$ maple2022/bin/maple -q problem.mpl

where problem.mpl is the following:

with(Student[Calculus1]):
ShowSolution(Diff(ln(x),x));

I get the following output.

Differentiation Steps
    Diff(ln(x),x)
▫    1. Apply the natural logarithm rule
        ◦ Recall the definition of the natural logarithm rule
        Diff(ln(x),x) = x^(-1)
    This gives:
    x^(-1)

I want the solver to use 1/x instead of x^(-1) in the output. How can I achieve this?

P.S. I require the output to be parsable, so using output=print to show fractions in a multi-line fashion is not a solution for me.

I have this very simple intergral

((Int(sin(m*Pi*y/a), y = 0 .. b))

I want to solve it when m is even then when it is odd. Of course, a and b are real positive. Then I will do the same with the other side of the integral.

Int(sin(n*Pi*y/a)*sin(m*Pi*y/a), y = 0 .. b)

Thank you in advance.

Mario

document:Laplace_Problem.mw

Hi! 

I've been working on a file in Maple, and saved it yesterday - but now I am not able to open it, as it is corrupted. I have been able to find the back up file, HOWEVER I am not able to load half of the file as Maple comes up with a "there was a problem loading your file....". Is there anything I can do to repair the back up file? 

Any help is greatly appreciated!

Back up file is here: C_Users_jonas_OneDrive_Skrivebord_Mat_B-A_Hjemmeopgavesæt_Opgavesæt_1115_MAS_-_Kopi.mw

Is it possible to graph multiple Niquist plots using DynamicSystems:-NiquistPlot() ? All my attemps have failed. 

Thanks.

How I can ontain results without Rootof !!

Thanks

help.mw

restart

EQ1 := c[11]*exp(-n*Pi*a/b)+c[12]*exp(n*Pi*a/b) = 0

c[11]*exp(-n*Pi*a/b)+c[12]*exp(n*Pi*a/b) = 0

(1)

EQ2 := c[11]*n*Pi/b-c[12]*n*Pi/b+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(n*Pi*exp(-n*Pi*x[0, 1]/b)/b+n*Pi*exp(n*Pi*x[0, 1]/b)/b)/(n*Pi) = c[21]*n*Pi/b-c[22]*n*Pi/b

c[11]*n*Pi/b-c[12]*n*Pi/b+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(n*Pi*exp(-n*Pi*x[0, 1]/b)/b+n*Pi*exp(n*Pi*x[0, 1]/b)/b)/(n*Pi) = c[21]*n*Pi/b-c[22]*n*Pi/b

(2)

c[21] := -b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)/(n*Pi)

-b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)/(n*Pi)

(3)

EQ3 := c[11]+c[12]+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(exp(-n*Pi*x[0, 1]/b)-exp(n*Pi*x[0, 1]/b))/(n*Pi) = lambda.(c[21]+c[22])

c[11]+c[12]+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(exp(-n*Pi*x[0, 1]/b)-exp(n*Pi*x[0, 1]/b))/(n*Pi) = lambda.(-b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)/(n*Pi)+c[22])

(4)

solve({EQ1, EQ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n*Pi*y[0, 1]/b)*Q[0, 1]+2*b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)*exp(n*Pi*a/b)+_Z*n*Pi*exp(-n*Pi*a/b)+_Z*n*Pi*exp(n*Pi*a/b))/(n*exp(n*Pi*a/b))))*n*exp(n*Pi*a/b))*Pi*n*exp(n*Pi*a/b))/(Pi*n*exp(n*Pi*a/b))}

(5)

``

Download help.mw

Hi,

Can i use Maple to do satellite image classification . by implement the satellite image so the software will do the math processing ?

Hi,

I want to plot the Tsai Wu failure envelope for a given
composite. The Tsai Wu failure criterion (for a pure biaxial
state of stress) is given by:

F1*x+F2*y+F11*x^2+F22*y^2+F12*x*y=1

can someone help me?please.

Can Maple carry around an unevaluated/inert  Matrix-Vector product(A matrix product without executing the matrix multiplication)? See Maple sheet.

inert_matrix_products.mw

restart

with(LinearAlgebra)

NULLNULL

Can Maple carry around an unevaluated/inert explicit Matrix-Vector product?

 

Define a matrix K and vector U as:

 

U := `<,>`(u1, u2)

Vector[column](%id = 36893490583464982996)

(1)

K := Matrix(2, 2, symbol = k)

Matrix(%id = 36893490583464975884)

(2)

I can take their product using MatrixVectorMultiply( ) I get,

MatrixVectorMultiply(K, U)

Vector[column](%id = 36893490583464964812)

(3)

however output I am really looking for is

 

(Matrix(2, 2, {(1, 1) = k[1, 1], (1, 2) = k[1, 2], (2, 1) = k[2, 1], (2, 2) = k[2, 2]})).(Vector(2, {(1) = u1, (2) = u2}))

NULL

In the later case, K.U is still a product however the actual matrix multiplication is not carried out. Sure, eventually I will want to evaluate the matrix-vector product but sometimes when setting up a problem I want to look at the explicit matrix equation before any explicit matrix multiplication is carried out.NULL

NULL

Here I show some ideas that don't work but may give a sense of what I am going for. I am essentially trying to mute the computation of the product while keeping the elements of the product together for further substitutions elsewhere. This there a standardized way to complish this? Or do I have to write my own procedure for something like this?

 

`&MatrixVectorMultiply`(K, U)

`&MatrixVectorMultiply`(Matrix(%id = 36893490583464975884), Vector[column](%id = 36893490583464982996))

(4)

%MatrixVectorMultiply(K, U)

%MatrixVectorMultiply(Matrix(%id = 36893490583464975884), Vector[column](%id = 36893490583464982996))

(5)

`&.`(K, U)

`&.`(Matrix(%id = 36893490583464975884), Vector[column](%id = 36893490583464982996))

(6)

K*%.U

`&.`(Matrix(%id = 36893490583464975884), Vector[column](%id = 36893490583464982996))*Matrix(%id = 36893490583464939756).Vector[column](%id = 36893490583464982996)

(7)

NULLNULL

Download inert_matrix_products.mw

I'm having trouble performing a direct operation, involving DotProduct, in the piecewise function. Attached is a document. I appreciate any contribution.

Regards,

Oliveira

Example2.mw

Hi,

I am new to Maple and I couldn't really find anything about this problem. Why doesn't Maple automatically simplify the last expression in the following? (see for example the first and last terms, as well as other terms)

total := (((((D^2/(alpha^2*mu^2) + D^2*exp(2*(-t + t1)*alpha*mu)/(alpha^2*mu^2)) + D^2*exp(2*(-t + t1)*alpha*mu)/(alpha^2*mu^2)) + D1*D/((alpha*mu*tau0 + 1)*alpha^2*mu^2) - (-alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) + exp(2*(-t + t1)*alpha*mu))*D*D1/(mu^2*alpha^2*(alpha^2*mu^2*tau0^2 - 1)) + (alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) - exp(2*(-t + t1)*alpha*mu))*D1*D/(alpha^2*mu^2*(alpha^2*mu^2*tau0^2 - 1))) - (-alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) + exp(2*(-t + t1)*alpha*mu))*D*D1/(mu^2*alpha^2*(alpha^2*mu^2*tau0^2 - 1))) + (alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) - exp(2*(-t + t1)*alpha*mu))*D1*D/(alpha^2*mu^2*(alpha^2*mu^2*tau0^2 - 1)) + D1*D/((alpha*mu*tau0 + 1)*alpha^2*mu^2) + D1^2/((alpha*mu*tau0 + 1)^2*alpha^2*mu^2) - (alpha*mu*tau0*exp(-(-t + t1)*(alpha*mu*tau0 - 1)/tau0) + alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 - 1)/tau0) - alpha^2*mu^2*tau0^2 - 1)*D1^2/(alpha^2*mu^2*(alpha^4*mu^4*tau0^4 - 2*alpha^2*mu^2*tau0^2 + 1))) - (alpha*mu*tau0*exp(-(-t + t1)*(alpha*mu*tau0 - 1)/tau0) + alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 - 1)/tau0) - alpha^2*mu^2*tau0^2 - 1)*D1^2/(alpha^2*mu^2*(alpha^4*mu^4*tau0^4 - 2*alpha^2*mu^2*tau0^2 + 1))

D1^2/((alpha*mu*tau0 + 1)^2*alpha^2*mu^2) + 2*D1*D/((alpha*mu*tau0 + 1)*alpha^2*mu^2) + D^2/(alpha^2*mu^2)

r2r2 := %;
 

total - r2r2;

((((((D^2/(alpha^2*mu^2) + D^2*exp(2*(-t + t1)*alpha*mu)/(alpha^2*mu^2)) + D^2*exp(2*(-t + t1)*alpha*mu)/(alpha^2*mu^2)) + D1*D/((alpha*mu*tau0 + 1)*alpha^2*mu^2) - (-alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) + exp(2*(-t + t1)*alpha*mu))*D*D1/(mu^2*alpha^2*(alpha^2*mu^2*tau0^2 - 1)) + (alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) - exp(2*(-t + t1)*alpha*mu))*D1*D/(alpha^2*mu^2*(alpha^2*mu^2*tau0^2 - 1))) - (-alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) + exp(2*(-t + t1)*alpha*mu))*D*D1/(mu^2*alpha^2*(alpha^2*mu^2*tau0^2 - 1))) + (alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 + 1)/tau0) - exp(2*(-t + t1)*alpha*mu))*D1*D/(alpha^2*mu^2*(alpha^2*mu^2*tau0^2 - 1)) + D1*D/((alpha*mu*tau0 + 1)*alpha^2*mu^2) + D1^2/((alpha*mu*tau0 + 1)^2*alpha^2*mu^2) - (alpha*mu*tau0*exp(-(-t + t1)*(alpha*mu*tau0 - 1)/tau0) + alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 - 1)/tau0) - alpha^2*mu^2*tau0^2 - 1)*D1^2/(alpha^2*mu^2*(alpha^4*mu^4*tau0^4 - 2*alpha^2*mu^2*tau0^2 + 1))) - (alpha*mu*tau0*exp(-(-t + t1)*(alpha*mu*tau0 - 1)/tau0) + alpha*mu*tau0*exp((-t + t1)*(alpha*mu*tau0 - 1)/tau0) - alpha^2*mu^2*tau0^2 - 1)*D1^2/(alpha^2*mu^2*(alpha^4*mu^4*tau0^4 - 2*alpha^2*mu^2*tau0^2 + 1))) - D1^2/((alpha*mu*tau0 + 1)^2*alpha^2*mu^2) - 2*D1*D/((alpha*mu*tau0 + 1)*alpha^2*mu^2) - D^2/(alpha^2*mu^2)
couldnt insert "r2r2" properly...

problemfilepdsolve.mw
 

eq1 := diff(p(x, t), x)-p(x, t)*(1/(p(x, t)^2*q(x, t)^(1/3)))

diff(p(x, t), x)-1/(p(x, t)*q(x, t)^(1/3))

(1)

eq2 := diff(q(x, t), x)-(-3*q(x, t))*(1/(p(x, t)^2*q(x, t)^(1/3)))

diff(q(x, t), x)+3*q(x, t)^(2/3)/p(x, t)^2

(2)

pdsolve({eq1, eq2})

Error, (in pdsolve/sys) found the element '_F2' repeated in the indication of blocks variables

 

eq3 := diff(p(x), x)-p(x)*(1/(p(x)^2*q(x)^(1/3)))

diff(p(x), x)-1/(p(x)*q(x)^(1/3))

(3)

eq4 := diff(q(x), x)-(-3*q(x))*(1/(p(x)^2*q(x)^(1/3)))

diff(q(x), x)+3*q(x)^(2/3)/p(x)^2

(4)

dsolve({eq3, eq4})

[{q(x) = -27/(_C1*x+_C2)^3}, {p(x) = (-3*(diff(q(x), x))*q(x)^(2/3))^(1/2)/(diff(q(x), x)), p(x) = -(-3*(diff(q(x), x))*q(x)^(2/3))^(1/2)/(diff(q(x), x))}]

(5)

eq5 := diff(p(x, t), x)-x = 0

diff(p(x, t), x)-x = 0

(6)

pdsolve(eq5)

p(x, t) = (1/2)*x^2+_F1(t)

(7)

eq6 := diff(p(x), x)-x = 0

diff(p(x), x)-x = 0

(8)

dsolve(eq6)

p(x) = (1/2)*x^2+_C1

(9)

NULL

``

(10)


Help me in finding the solution of system eq1 and eq2.

Download problemfilepdsolve.mw

 

Hope the resolution of the images which come via Plot3d and plot commands are atleast 300 dpi

If not how to make them

First 107 108 109 110 111 112 113 Last Page 109 of 2308