MaplePrimes Questions

I have expression which can have many different functions  in it. Assume the expression is `+` type.

I do not know before what these function names are. 

Is there a way to make Maple collect on these functions automatically? Simplify does not do it. So if there is something like b*g(x)+g(x) in the expression, to simplify this to (1+b)*g(x) automatically?

I noticed if expression is   just b*g(x)+g(x) then simplify does give (1+b)*g(x) but once I add a new term, like 3+b*g(x)+g(x) then it no longer does it! which for me is very strange. I was expecting to get 3+(1+b)*g(x) 

Here is an example

restart;

T:=g(x)+b*g(x);
simplify(T);

g(x)+b*g(x)

g(x)*(b+1)

T:=3+g(x)+b*g(x);
simplify(T);

3+g(x)+b*g(x)

3+g(x)+b*g(x)

T:=3+g(x)+b*g(x)+f(x);
simplify(T);

3+g(x)+b*g(x)+f(x)

3+g(x)+b*g(x)+f(x)

 

 

Download simplification_oct_9_2024.mw

What do I need to do to get this output using another software

Ofcourse, I could go and add code to find the names of each function and then use collect. But it seems to me simplify should have done this automatically as the above shows. So I am wondering if there is an option I've overlooked which will do this more easily.

Maple 2024.1

In the rectangular Cartesian coordinate system, three straight lines gA, gB, gC are given, which are not all parallel to each other. Another straight line g and the points Oa, Ob, Oc on it are given. A triangle ABC is to be constructed, one of whose vertices lies on gA, gB or gC and the triangle sides a, b and c (or their extensions) each run through Oa, Ob or Oc.
We are looking for the coordinates of the vertices A, B, C.
In a purely constructive solution, the calculation can be omitted.

Hi everyone, I just try a simple equivalent implicitplot3d code regarding Maple and matlab to see difference. First for Maple, I don't set grid, just input one random complicated function and displays "Warning, solutions may have been lost", while matlab doesn't, but it's figure cannot compare with maple's in terms of detail or beauty (just focused on this case). I wanna know why. Hope for your reply!
The Maple code is as below

NULL

restart

with(plots)

implicitplot3d(x^(2*z)+y^(-2*y^(-z))+exp(-.1*z^2) = 1)

Warning, solutions may have been lost

 

Warning, solutions may have been lost

 

 

NULL

Download implicitplot3d_solution_lost_try.mw

The orange font is equivalent matlab code and figure is attached.
% Define the function for implicit plotting

f = @(x, y, z) x.^(2*z) + y.^(-2*y.^(-z)) + exp(-0.1*z.^2) - 1;

% Use fimplicit3 for 3D implicit plotting

fimplicit3(f, [-2 2 -2 2 -2 2]);

% Set labels and title

xlabel('x');

ylabel('y');

zlabel('z');

title('Implicit 3D Plot of f(x, y, z) = 1');

Hi
I hope you are doing well. I have plotted (in the attached file) the contour plot of the function and its density plot; both have the same behavior but different appearances (error in direction may be rotation needs to apply). I don't know why it happens because this code works well for other solutions. Kindly have a look and fix the issue. I shall be waiting for your positive response. Please take care.
Help.mw

I do not understandwhat this result from Maple means.

I don't know what it means when a result has "Root of", and in this case, there is also a big summation sign for which I can't tell if the variables underneath it are part of the summartion, or what.  I'd appreciate any guidance to make sense of what this means..

restart

with(inttrans)

assump := R1::real, R2::real, L1::real, C1::real, C2::real, L2::real, omega::real, M::real, R1 > 0, R2 > 0, L1 > 0, C1 > 0, L2 > 0, C2 > 0, omega > 0, M > 0

R1::real, R2::real, L1::real, C1::real, C2::real, L2::real, omega::real, M::real, 0 < R1, 0 < R2, 0 < L1, 0 < C1, 0 < L2, 0 < C2, 0 < omega, 0 < M

(1)

expr := Vin/(s*(R1+s*L1-1/(s*C1)+(omega*M)^2/(R2+s*L2-1/(s*C2))))

Vin/(s*(R1+s*L1-1/(s*C1)+omega^2*M^2/(R2+s*L2-1/(s*C2))))

(2)

invlaplace(expr, s, t)

Vin*C1*(sum(exp(_alpha*t)*(-1+C2*_alpha*(L2*_alpha+R2))/(4*C1*C2*L1*L2*_alpha^3+2*C1*C2*M^2*_alpha*omega^2+3*C1*C2*L1*R2*_alpha^2+3*C1*C2*L2*R1*_alpha^2+2*C1*C2*R1*R2*_alpha-2*C1*L1*_alpha-2*C2*L2*_alpha-C1*R1-C2*R2), _alpha = RootOf(1+C1*C2*L1*L2*_Z^4+(C1*C2*L1*R2+C1*C2*L2*R1)*_Z^3+(C1*C2*M^2*omega^2+C1*C2*R1*R2-C1*L1-C2*L2)*_Z^2+(-C1*R1-C2*R2)*_Z)))

(3)

NULL

Download for_help2.mw

Hello,

I noticed that the Linearly Implicit Euler method (also known as the Semi-Implicit Euler method) is not available in Maple's built-in ODE solvers. This method is useful for stiff ODEs, where part of the function is treated implicitly (for the linear term) and part is treated explicitly (for the non-linear term).

I know that the Linearly Implicit Euler method is a specialized method that probably does not find enough widespread use to justify its inclusion as a standard feature in Maple, especially given Maple's focus on numerical methods such as Runge-Kutta methods and fully implicit methods for rigid equations.

I’m wondering:

  1. Why isn’t this method included in Maple’s standard set of numerical solvers?
  2. How can I implement this method in my own code in Maple to solve stiff ODEs?

Any guidance or examples of implementation would be greatly appreciated!

Thank you!

Linearly_Implicit_Method.pdf

Hello,

I need to order a set of polynomials based on a given ranking. For example:

F:=[F1,F2,F3,F4,F5,F6]:
F1 := x1*x4^2+x4^2-x1*x2*x4-x2*x4+x1*x2+3*x2;
F2 := x1*x4-x3-x1*x2;
F3 := x3*x4-2*x2^2-x1*x2-1;
F4 := x1*x3^2+x3^2-x1^2*x2*x3-x1*x2*x3+x1^3*x2+3*x1^2*x2;
F5 := -x3^2 + x1*x2*x3 -2*x1*x2^2-x1^2*x2-x1;
F6 := 2*x1*x2^2+2*x1^2*x2^2-2*x1^2*x2+x1^2+x1;

The order used to rank the polynomials is based on the variables in the following order: x1 < x2 < x3 < x4.

The ranking criteria are:

  1. The first polynomial should be the one involving x4 with the lowest degree of nonlinearity in x4 and the fewest number of terms (in this case, F2).
  2. The next polynomial should also involve x4, but with the lowest degree of nonlinearity and the next fewest number of terms and so on.
  3. Once the polynomials in x4 are exhausted, the ranking continues similarly for the next variable x3, followed by x2, and finally x1.

How can I do this efficiently?

Obs.:If necessary, I can share my solution to the problem, though it's far from efficient.

Hello,

I am attempting to solve what appears to be a simple system of two ordinary differential equations (ODEs) (please find the attached file). However, I encountered an error message from Maple stating: "division by zero."

Could anyone suggest an approach to obtain a closed-form solution for this system?

Please note that the system includes two variables: S(t) and K(t). All other symbols represent positive parameters.

Thank you in advance for your assistance!

Best regards,

Dmitry

Download ODE.mw

I use the solve commant. The restult is a function with y as variable.

But when I want to use that function, the variable is not recognized.

How can this be fixed?

solve_no_variable_v1.mw

Good morning, please tell us how to graph on a map the graph that is seen in the image with those colors and their areas for the following exercise:

1. Draw the graph and find the area of ​​the region that is inside the cardioid r=2+2 cosθ and outside the circumference r=3

Calculate the area of ​​the region common to the two regions limited by the following curves:

r1= -6*cos(θ) Circle
r2= 2-2*cos(θ) Cardioid

 

A classic task from surveying that is unfortunately no longer taught in our GPS age and is worth remembering:

A hiker has lost his way and wants to know where he is. He has a map, a compass, paper, pen and calculator in his bag. From his position he sees three distant objects from left to right: a radio mast F, a chimney S and a church tower K. He also finds these objects on his map. Using his compass he aims at the three objects and measures the angles at which the distances FS and SK appear: angle for FS=alpha, angle for SK=beta. The hiker also manages to get the approximate coordinates of the three objects from the map to scale: F=(xf;yf), S=(xs;ys) and K=(xk;yk).
Question:
What are the hiker's coordinates?

Hello, I am having problem in solving the pde in the image using maple. Due to its nonlinear nature it has been solved for small value of v using first order perturbation technique and seperation of variable method into radial and angular part in many papers. I am having trouble in proceeding as Maple complains about Boundary/Initial condition.Please tell me if Maple can provide any help in improving existing solution or providing new solution? I can post the full solution procedure by the method i mentioned if needed.

restart

ode0 := (diff(xi^2*(diff(theta[E](xi), xi)), xi))/xi^2 = -theta[E](xi)^n

(2*xi*(diff(theta[E](xi), xi))+xi^2*(diff(diff(theta[E](xi), xi), xi)))/xi^2 = -theta[E](xi)^n

(1)

bc0 := theta[E](0) = 1, (D(theta[E]))(0) = 0

theta[E](0) = 1, (D(theta[E]))(0) = 0

(2)

base := dsolve({bc0, ode0}, theta[E](xi), series)

theta[E](xi) = series(1-(1/6)*xi^2+((1/120)*n)*xi^4+O(xi^6),xi,6)

(3)

pde1 := (diff(xi^2*(diff(psi(xi, mu), xi)), xi))/xi^2+(diff((-mu^2+1)*(diff(psi(xi, mu), mu)), mu))/xi^2 = -psi(xi, mu)^n+v

(2*xi*(diff(psi(xi, mu), xi))+xi^2*(diff(diff(psi(xi, mu), xi), xi)))/xi^2+(-2*mu*(diff(psi(xi, mu), mu))+(-mu^2+1)*(diff(diff(psi(xi, mu), mu), mu)))/xi^2 = -psi(xi, mu)^n+v

(4)

bc1 := psi(0, mu) = 1, (D[1](psi))(0, mu) = 0, (D[2](psi))(0, mu) = 0, limit(psi(xi, mu), v = 0) = rhs(base)

psi(0, mu) = 1, (D[1](psi))(0, mu) = 0, (D[2](psi))(0, mu) = 0, psi(xi, mu) = series(1-(1/6)*xi^2+((1/120)*n)*xi^4+O(xi^6),xi,6)

(5)

pdsolve(pde1, [bc1], psi(xi, mu))

Error, (in pdsolve/sys) too many arguments; some or all of the following are wrong: [[psi(xi,mu)], [psi(0,mu) = 1, D[1](psi)(0,mu) = 0, D[2](psi)(0,mu) = 0, psi(xi,mu) = series(1-1/6*xi^2+1/120*n*xi^4+O(xi^6),xi,6)]]

 

``

Download Nonlinear_Elliptic_PDE_in_Spherical_Coordinate.mw

I need to modify only one entry in a .m file (which happens to be table entry). How do I do this?

Hi! 

I want to create a matrix of variables, and another matrix of variables that are different from the first matrix.

The idea is to generate a matrix of equations, then reshape the matrix into an array of functions, and then enter the array into "solve" to solve the system of equations.  

I was able to do this in a different software package, and I was able to do it.

Basically, (matrix a - matrix b - identity matrix).  Then, "equate" this matrix to a matrix of zeros to generate the right hand side.

Can this be done in maple? How would one do this?

Given a conventionally labeled triangle ABC with the two sides a=3 and b=4, c is not given. What is the side length of the largest inscribed square whose "base" lies on the triangle side c?

First 63 64 65 66 67 68 69 Last Page 65 of 2426