Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

According to the Maple documentation, both commands can handle inequalities. I'm only interested in checking when a semialgebraic set is empty, so I thought SemiAlgebraicSetTools:-IsEmpty would be generally faster than computing the solutions with the SemiAlgebraic command. However, the following code shows otherwise:

Code 1:

```

restart;
with(SolveTools, SemiAlgebraic);

B_poly := -(x + 4)*(x + 3)*(x + 2)*(x + 1)*(x - 1)*(x - 2)*(x - 3)*(x - 4);
g := -1/100000*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(-1/670*(x+4)
*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)-669/670)^136+1/100000*(x+4)*(x+3)*(x
+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(1/670*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x
-3)*(x-4)-669/670)^136;
f := -4347225/87808*x^8 - 17375/392*x^7 + 629491375/395136*x^6 + 
   266375/252*x^5 - 200677775/12544*x^4 - 3174625/504*x^3 + 
   11067842125/197568*x^2 - 53625/98*x - 126496075/4116;

SemiAlgebraic(
  [B_poly >= 0, g - f >= 0], [x]);

```
 

Code 2:

```

restart;
with(RegularChains, SemiAlgebraicSetTools, PolynomialRing);

local R := PolynomialRing([x]);

B_poly := -(x + 4)*(x + 3)*(x + 2)*(x + 1)*(x - 1)*(x - 2)*(x - 3)*(x - 4);
g := -1/100000*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(-1/670*(x+4)
*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)-669/670)^136+1/100000*(x+4)*(x+3)*(x
+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(1/670*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x
-3)*(x-4)-669/670)^136;
f := -4347225/87808*x^8 - 17375/392*x^7 + 629491375/395136*x^6 + 
   266375/252*x^5 - 200677775/12544*x^4 - 3174625/504*x^3 + 
   11067842125/197568*x^2 - 53625/98*x - 126496075/4116;

SemiAlgebraicSetTools:-IsEmpty([B_poly >= 0, g-f >= 0], R);

```

My computer finishes 'Code 1' in about 20 seconds, while 'Code 2' doesn't terminate. Am I misunderstanding something about how to use these commands for my problem? I'd appreciate it if you could clarify why this is happening and when to use each command in each case. Thanks!

For example, given plot f(x)= x^5+x. plot the function given by g(x)= f(x-2)+3

Also, when plotting my graphs they look different than other graphing software.

How to rectify this error.

S-D_effect-RK.mw

The Lunar New Year is approaching and 2024 is the Year of the Dragon! This inspired me to create a visualization approximating the dragon curve in Maple Learn, using Maple. 

The dragon curve, first described by physicist John Heighway, is a fractal that can be constructed by starting with a single edge and then continually performing the following iteration process:  

Starting at one endpoint of the curve, traverse the curve and build right triangles on alternating sides of each edge on the curve. Then, remove all the original edges to obtain the next iteration. 

visual of dragon curve iteration procedure 

This process continues indefinitely, so while we can’t draw the fractal perfectly, we can approximate it using a Lindenmayer system. In fact, Maple can do all the heavy lifting with the tools found in the Fractals package, which includes the LSystem subpackage to build your own Lindenmayer systems. The subpackage also contains different examples of fractals, including the dragon curve. Check out the Maple help pages here: 

Overview of the Fractals Package  

Overview of the Fractals:-LSystem Subpackage 

Using this subpackage, I created a Maple script (link) to generate a Maple Learn document (link) to visualize the earlier iterations of the approximated dragon curve. Here’s what iteration 11 looks like: 

eleventh iteration of dragon curve approximation  

You can also add copies of the dragon curve, displayed at different initial angles, to visualize how they can fit together. Here are four copies of the 13th iteration: 

four copies of the thirteenth iteration of the dragon curve approximation 

 

Mathematics is full of beauty and fractals are no exception. Check out the LSystemExamples subpackage to see many more examples. 

 

Happy Lunar New Year! 

 

What technique would you try to solve the following non-linear differential equation for real g(x) given h(x) is real (finite positive) polynomial?      h(x) = g(x) + g'(x)/g(x),      where g'(x) = dg(x)/dx

I want to convert the maple result 

arctan(y/x) to arctan(y,x), 

so if x is equal zero i obtain pi/2 and not diveided by zero 

 

 

i have two euations including integration which has two unkwnon x1 and x2.
how can i get these equations solved, thanks for the help.

restart:

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(1)

with(LinearAlgebra):

with(Student:-Calculus1):

with(Student:-NumericalAnalysis):

A:=convert(taylor(exp(Q),Q,6),polynom);

1+Q+(1/2)*Q^2+(1/6)*Q^3+(1/24)*Q^4+(1/120)*Q^5

(2)

Q:=a[11]*(E[r])^2+a[22]*(E[theta])^2+2*a[12]*E[r]*E[theta];

E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22]

(3)

psi:=0.5*c*(exp(Q)-1);

.5*c*(exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])-1)

(4)

F:=Matrix(3,3,[[lambda[r],0,0],[0,lambda[theta],0],[0,0,lambda[z]]]);

Matrix(3, 3, {(1, 1) = lambda[r], (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = lambda[theta], (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = lambda[z]})

(5)

sigma[r]:=-p+diff(psi,E[r])*F[1,1]^2;

-p+.5*c*(2*E[r]*a[11]+2*E[theta]*a[12])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[r]^2

(6)

sigma[theta]:=-p+diff(psi,E[theta])*F[2,2]^2;

-p+.5*c*(2*E[r]*a[12]+2*E[theta]*a[22])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[theta]^2

(7)

sigma[z]:=-p+diff(psi,E[z])*F[3,3]^2;

-p

(8)

p1:=diff(psi,E[r])*F[1,1]^2;#Pressure is constituted form 3 parts, one part is p1, other part is p2 and a constant p0

.5*c*(2*E[r]*a[11]+2*E[theta]*a[12])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[r]^2

(9)

E[r]:=0.5*(lambda[r]^2-1);

.5*lambda[r]^2-.5

(10)

E[theta]:=0.5*(lambda[theta]^2-1);

.5*lambda[theta]^2-.5

(11)

E[z]:=0.5*(lambda[z]^2-1);

.5*lambda[z]^2-.5

(12)

lambda[r]:=x2*sqrt((r^2-x1)/x2)/r;

x2*((r^2-x1)/x2)^(1/2)/r

(13)

lambda[theta]:=r/sqrt((r^2-x1)/x2);

r/((r^2-x1)/x2)^(1/2)

(14)

lambda[z]:=1/x2;

1/x2

(15)

sigma[r];

-p+.5*c*(2*(.5*x2*(r^2-x1)/r^2-.5)*a[11]+2*(.5*r^2*x2/(r^2-x1)-.5)*a[12])*exp((.5*x2*(r^2-x1)/r^2-.5)^2*a[11]+2*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)*a[12]+(.5*r^2*x2/(r^2-x1)-.5)^2*a[22])*x2*(r^2-x1)/r^2

(16)

sigma[theta]:

sigma[z]:

#p2:=int((sigma[r]-sigma[theta])/r,r):%Pressure is constituted form 2 parts, one part is p1, other part is p2 and and a constant p0

Digits:=10:

c:=790000:

a[11]:=0.539:

a[22]:=0.368:

a[12]:=0.653:

p_in:=10000:

p_out:=0:

r_in:=5.4e-3:

r_out:=6.1e-3:

F_a:=0.381846:

p21:=(c/2)*(((r^2-x1)/r^3)-(x2*r/(r^2-x1)))*exp(Q);

395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)

(17)

p22:=(c/2)*Int(exp(Q)*(3*x2*r^6-r^6+5*x1*r^4-x1*x2*r^4-7*x1^2*r^2+3*x1^3)/(r^4*(r^2-x1)^2),r=r_in..r_out);#This is the part that should be maintained as an integral until the final solution

395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(18)

p2:=p21-p22;#p2 is computed using the integration by part method

395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)-395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(19)

 

p0:=(p_out+eval(p2,r=r_out));#p0 is the constant which is defined form the boundary conditions either p_out=subs(r=r_out,sigma[r]) or p_in=subs(r=r_in,sigma[r])

395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2)-395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(20)

 

p:=p1+p2+p0;#p is the total pressure

395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2+395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)-790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))+395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2)

(21)

#p:=H+H00;

eq1:=Int((sigma[r]-sigma[theta])/r,r=r_in..r_out);

Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2)

(22)

eq2:=Int(2*Pi*sigma[z]*r,r=r_in..r_out);

Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2)

(23)

#eq1:=Quadrature((sigma[r]-sigma[theta])/r,r=r_in..r_out,method=gaussian[5],output=value):

#eq2:=Quadrature(2*Pi*sigma[z]*r,r=r_in..r_out,method=gaussian[5],output=value):

eq1=evalf(p_out-p_in)

Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2) = -10000.

(24)

eq2=F_a

Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2) = .381846

(25)

fsolve({eq1=evalf(p_out-p_in),eq2=F_a},{x1,x2});

fsolve({Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2) = -10000., Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2) = .381846}, {x1, x2})

(26)

SolveEquations([eq1=evalf(p_out-p_in),eq2=F_a]);

Warning, objective function returns unfeasible value HFloat(undefined) for initial point [x1 = .9, x2 = .9]; trying to find a feasible initial point

 

Error, (in DirectSearch:-Search) cannot find feasible initial point; specify a new one

 

 

 

 

fsolve_problem.mw

For this integro-differential equation,

Equation:= int[y'(x)* (x^2)/[(x^2)-1],x)  =  (int[sqrt(y(x)])^(-2/3)

Maple is able to obtain an exact intrinsic solution

from which an exact solution can be extracted, namely,

ExtrinsicSolution:= y(x) = sqrt(3)*(-8*_C1*x^(8/3) + 12*x^2 - 3)^(3/4)

My question concerns how was this solution obtained.

Even more, specifically, 'odeadvisor' suggests converting the

equation in question to the form

ode:= y = G(x,diff(y(x),x));

However, I cannot reconcile how this can be applied to an equation which

contains two integrals. (Regretably, I am not able to directly, attach my

Maple worksheet directly on to this sheet). The situation is that after

applying 'dsolve' to the above 'Equation', Maple comes back with an

intrinsic solution which can was used to obtain the 'ExtrinsicSolution' in 

the above.  So it is the missing steps between applyingthe dsolve command

to Equation and the intrinsic solution which MS provides which, in turn, leads

to the 'Extrinsic Solution' above. I would greatly, appreciate if anyone can 

fill in the missing steps.

I was trying this ode with Maple

Do you agree this solution is not correct by Maple?

restart;

ode:=diff(y(t),t)+y(t)=Dirac(t);
ic:=y(0)=1;
sol:=dsolve([ode,ic],y(t),method='laplace');

It gives  y(t) = 2*exp(-t)

But from the discussion in the above link we see this is wrong solution. Maple also does not verify it:

odetest(sol,[ode,y(0)=1])

[-Dirac(t), -1]

Would this be considered a bug I should report or not? Note this result is only when using Laplace method. The default method gives better solution.

ode:=diff(y(t),t)+y(t)=Dirac(t);
ic:=y(0)=1;
sol:=dsolve([ode,ic],y(t));
odetest(sol,[ode,y(0)=1])

 

Maple 2023.2.1

How to convert barycentric coordinates to cartesian ? Thank you

I want to approximate a positive function that is decreasing in Gamma, say f(Gamma), that is very complicated yet very smooth. I need this in order to obtain a tractable and compact version of its derivative, which enters in the partial derivative of another (very simple) function.

Along the way, three related questions emerge: Derivatives_and_Approximations.mw

Thanks a lot!

Hi,

I am attempting to illustrate various solids in Maple. How can I do this with ? (Figure 3 on my worksheet). Thank you

S5SolidQ.mw

Is there a way to manipulate an equation so that it is in the form of (Expression of Primary Variables)*(Expression of Secondary Variables)
In the example below from Video 1: Fast Analytical Techniques for Electrical and Electronic Circuits (youtube.com), the primary variables are R1 and R2

PS. When I type ctrl-v to insert an image, I always get 2 copies.

I got the proportional symbol to work once, typing "proportional" + CRTL + Space.  Went for wlak came back and could not get it to work at all.

Does it actually work or am I imagining things?

Greetings All,

This is an application for control theory, specifially using Maple to solve control problems in the area of Interconnection and Damping Assignment Passivity Based Control (IDA-PBC).

- Assuming two variables (iL and Vo), there is a potential function that I am trying to solve for called "Ha".  I have two equations here, and I want to solve for Ha using the pdsolve() command:  

eq1 := diff(Ha(iL, Vo), iL) = rhs(result[1]);
eq2 := diff(Ha(iL, Vo), Vo) = rhs(result[2]);
pdsolve( {eq1, eq2  } );

Once I do this, Maple gives me an expression for Ha that has arbitrary functions in it (I understand where these are coming from).  So far, so good.

--> In order to get help solving for these arbitrary functions, I also want to tell Maple some constraints.  For example:

"the Hessian matrix of Ha must be positive definite"

Is there a way to do this?

First 12 13 14 15 16 17 18 Last Page 14 of 2097