Katatonia

65 Reputation

4 Badges

4 years, 102 days

MaplePrimes Activity


These are questions asked by Katatonia

Suppose H is a 2*2 matrix and (x0,y0) is the center of an ellipse. We want to draw the ellipse in form of (x-x0,y-y0)H(x-x0,y-y0)^T. 

Equivalently, suppose we use variable P to show both x and y in the vector form. How is it possible to draw P^T H P? I would be thankful if you could give me and example.

Suppose we have a "Finite-horizon, continuous-time LQR" optimal control problem. I am wondering how to solve Riccati DE and then determine state and control over time. Is it possible to analytically solve Riccati DEs? Suppose we have this example and we want to solve the problem based on the formulas in Wikipedia webpage.

A := Matrix(2, 2, [[2, 1], [1, -1]])

B := Vector[column](2, [3, 1])

Q := Matrix(2, 2, [[3, 0], [0, 2]])

R := 3

https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator

I want to solve a differential equation with piecewise function, but I face an error. I am wondering how to handle it. Thanks

t[1]:=1

x := t -> piecewise(0 <= t and t < t[1], -60*t + 100, t[1] <= t and t <= 10, 1.645*sqrt(480*t))

dsolve({diff(p(t), t) = 2*h*x(t), p(T) = 0}, p(t))

and the error is :

"Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {pT = 0}"

t[1] := 1.05

1.05

(1)

x := proc (t) options operator, arrow; piecewise(0 <= t and t < t[1], -60*t+100, t[1] <= t and t <= 10, 1.645*sqrt(480*t)) end proc

proc (t) options operator, arrow; piecewise(0 <= t and t < t[1], -60*t+100, t[1] <= t and t <= 10, 1.645*sqrt(480*t)) end proc

(2)

dsolve({p*T = 0, diff(p(t), t) = 2*h*x(t)}, p(t))

Error, (in dsolve) ambiguous input: the variables {p} and the functions {p(t)} cannot both appear in the system

 

``

Download Error.mw

I have two functions U1 and U2 which are both piecewise functions. I want to determine the function representing the summation or subtraction of these two functions, that is, U=U1-U2 or U=U1+U2.

alpha := 0.01;
                         alpha := 0.01
U1 := piecewise((1 - alpha)*lambda[1] - lambda[2] <= 0, 0, 0 < (1 - alpha)*lambda[1] - lambda[2], 5)
U2 := piecewise(-(1 + alpha)*lambda[1] + lambda[2] <= 0, 0, 0 < -(1 + alpha)*lambda[1] + lambda[2], 5)

Suppose we have U=U1-U2. I am wondering how to draw regions defined by function U and also how to label them.

Hello

I purchased the license of Maple 2019 and I am using the same version up to now. I am wondering if I download the latest version, can I use the former license? When I click on "check for updates" there is nothing for updating but when I want to run a Maple file written in the latest version, I face an error. 

1 2 3 Page 1 of 3