MaplePrimes Questions

I am trying to get Maple to simplify the following trigonometric expressions (for "generic" parameters) as much as possible

sineExpr(3) := (
   sin(a[2] - b[1])*sin(a[3] - b[1]))/(
   sin(b[2] - b[1])*sin(b[3] - b[1]))*sin(a[1] - b[1]) + (
   sin(a[3] - b[2])*sin(a[1] - b[2]))/(
   sin(b[3] - b[2])*sin(b[1] - b[2]))*sin(a[2] - b[2]) + (
   sin(a[1] - b[3])*sin(a[2] - b[3]))/(
   sin(b[1] - b[3])*sin(b[2] - b[3]))*sin(a[3] - b[3]);
 = 
   (('RealDomain:-sin'(a[2]-b[1])*'RealDomain:-sin'(a[3]-b[1]))/('RealDomain:-sin'(b[2]-b[1])*'RealDomain:-sin'(b[3]-b[1])))&*'RealDomain:-sin'(a[1]-b[1])+(('RealDomain:-sin'(a[3]-b[2])*'RealDomain:-sin'(a[1]-b[2]))/('RealDomain:-sin'(b[3]-b[2])*'RealDomain:-sin'(b[1]-b[2])))&*'RealDomain:-sin'(a[2]-b[2])+(('RealDomain:-sin'(a[1]-b[3])*'RealDomain:-sin'(a[2]-b[3]))/('RealDomain:-sin'(b[1]-b[3])*'RealDomain:-sin'(b[2]-b[3])))&*'RealDomain:-sin'(a[3]-b[3])


sineExpr(4) := (
   sin(a[2] - b[1])*sin(a[3] - b[1])*sin(a[4] - b[1]))/(
   sin(b[2] - b[1])*sin(b[3] - b[1])*sin(b[4] - b[1]))*
   sin(a[1] - b[1]) + (
   sin(a[3] - b[2])*sin(a[4] - b[2])*sin(a[1] - b[2]))/(
   sin(b[3] - b[2])*sin(b[4] - b[2])*sin(b[1] - b[2]))*
   sin(a[2] - b[2]) + (
   sin(a[4] - b[3])*sin(a[1] - b[3])*sin(a[2] - b[3]))/(
   sin(b[4] - b[3])*sin(b[1] - b[3])*sin(b[2] - b[3]))*
   sin(a[3] - b[3]) + (
   sin(a[1] - b[4])*sin(a[2] - b[4])*sin(a[3] - b[4]))/(
   sin(b[1] - b[4])*sin(b[2] - b[4])*sin(b[3] - b[4]))*
   sin(a[4] - b[4]);
 = 
(('RealDomain:-sin'(a[2]-b[1])*'RealDomain:-sin'(a[3]-b[1])*'RealDomain:-sin'(a[4]-b[1]))/('RealDomain:-sin'(b[2]-b[1])*'RealDomain:-sin'(b[3]-b[1])*'RealDomain:-sin'(b[4]-b[1])))&*'RealDomain:-sin'(a[1]-b[1])+(('RealDomain:-sin'(a[3]-b[2])*'RealDomain:-sin'(a[4]-b[2])*'RealDomain:-sin'(a[1]-b[2]))/('RealDomain:-sin'(b[3]-b[2])*'RealDomain:-sin'(b[4]-b[2])*'RealDomain:-sin'(b[1]-b[2])))&*'RealDomain:-sin'(a[2]-b[2])+(('RealDomain:-sin'(a[4]-b[3])*'RealDomain:-sin'(a[1]-b[3])*'RealDomain:-sin'(a[2]-b[3]))/('RealDomain:-sin'(b[4]-b[3])*'RealDomain:-sin'(b[1]-b[3])*'RealDomain:-sin'(b[2]-b[3])))&*'RealDomain:-sin'(a[3]-b[3])+(('RealDomain:-sin'(a[1]-b[4])*'RealDomain:-sin'(a[2]-b[4])*'RealDomain:-sin'(a[3]-b[4]))/('RealDomain:-sin'(b[1]-b[4])*'RealDomain:-sin'(b[2]-b[4])*'RealDomain:-sin'(b[3]-b[4])))&*'RealDomain:-sin'(a[4]-b[4])

So far, all of my attempts have failed: 
 

restart:

kernelopts('version');

Physics:-Version();

`Maple 2024.0, X86 64 WINDOWS, Mar 01 2024, Build ID 1794891`

 

`The "Physics Updates" version in the MapleCloud is 1701 and is the same as the version installed in this computer, created 2024, March 17, 17:24 hours Pacific Time.`

(1)

sineExpr := proc (m::posint) options operator, arrow; add(mul(ifelse(j <> t, (':-sin')(a[j]-b[t])/(':-sin')(b[j]-b[t]), (':-sin')(a[t]-b[t])), j = 1 .. m), t = 1 .. m) end proc

Warning, (in sineExpr) `t` is implicitly declared local

 

Warning, (in sineExpr) `j` is implicitly declared local

 

Warning, (in sineExpr) `t` is implicitly declared local

 

Warning, (in sineExpr) `j` is implicitly declared local

 

combine(simplify(normal(sineExpr(1), expanded), trig), trig);

sin(a[1]-b[1])

(2)

combine(simplify(normal(sineExpr(2), expanded), trig), trig); # which can be transformed into sin((a[1]+a[2])-(b[1]+b[2])) only in certain legacy versions!

-(1/2)*(cos(-2*b[2]+a[1]+a[2])-cos(-2*b[1]+a[1]+a[2]))/sin(b[1]-b[2])

(3)

combine(simplify(normal(sineExpr(3), expanded), trig), trig);

(1/2)*(cos(-b[1]-3*b[2]+b[3]+a[2]+a[3]+a[1])-cos(b[1]-3*b[2]-b[3]+a[2]+a[3]+a[1])-cos(-b[1]-3*b[3]+a[2]+a[3]+a[1]+b[2])+cos(b[1]-3*b[3]-b[2]+a[2]+a[3]+a[1])+cos(-3*b[1]+a[2]+a[3]+a[1]+b[2]-b[3])-cos(-3*b[1]+a[2]+a[3]+a[1]-b[2]+b[3]))/(sin(-2*b[2]+2*b[1])-sin(-2*b[3]+2*b[1])+sin(2*b[2]-2*b[3]))

(4)

CodeTools:-Usage(combine(simplify(normal(sineExpr(4), expanded), trig), trig));

memory used=244.67MiB, alloc change=0 bytes, cpu time=6.17s, real time=5.49s, gc time=1000.00ms

 

(1/2)*(sin(-2*a[3]+4*a[4]+2*a[2]-b[3]-b[4]-b[2]-b[1])-sin(4*a[2]-2*a[4]-b[3]-b[4]-b[2]-b[1]+2*a[1])+sin(-2*a[2]-b[3]-b[4]-b[2]-b[1]+4*a[4]+2*a[1])+sin(-2*a[2]+b[3]+b[4]+b[2]+b[1]-4*a[4]+2*a[1])+sin(-b[3]-b[4]-b[2]-b[1]+4*a[1]-2*a[3]+2*a[4])-sin(4*a[3]-2*a[4]+2*a[2]-b[3]-b[4]-b[2]-b[1])-sin(-4*a[3]-2*a[4]+2*a[2]+b[3]+b[4]+b[2]+b[1])+sin(-2*a[3]-4*a[4]+2*a[2]+b[3]+b[4]+b[2]+b[1])-sin(-2*a[3]+2*a[4]+4*a[2]-b[3]-b[4]-b[2]-b[1])+sin(-4*a[3]+b[3]+b[4]+b[2]+b[1]-2*a[4]+2*a[1])-sin(4*a[4]-2*a[3]-b[3]-b[4]-b[2]-b[1]+2*a[1])-sin(-2*a[2]-b[3]-b[4]-b[2]-b[1]+4*a[3]+2*a[1])-sin(-2*a[2]+b[3]+b[4]+b[2]+b[1]-4*a[3]+2*a[1])+sin(2*a[3]-2*a[4]+4*a[2]-b[3]-b[4]-b[2]-b[1])-sin(-4*a[2]-2*a[4]+b[3]+b[4]+b[2]+b[1]+2*a[1])+sin(4*a[3]-b[3]-b[4]-b[2]-b[1]-2*a[4]+2*a[1])-sin(-b[3]-b[4]-b[2]-b[1]+4*a[1]+2*a[3]-2*a[4])-sin(-b[3]-b[4]-b[2]-b[1]+4*a[1]+2*a[4]-2*a[2])+sin(-b[3]-b[4]-b[2]-b[1]+4*a[1]-2*a[4]+2*a[2])+sin(-b[3]-b[4]-b[2]-b[1]+4*a[1]+2*a[3]-2*a[2])-sin(-b[3]-b[4]-b[2]-b[1]+4*a[1]-2*a[3]+2*a[2])-sin(-4*a[4]-2*a[3]+b[3]+b[4]+b[2]+b[1]+2*a[1])+sin(4*a[2]-2*a[3]-b[3]-b[4]-b[2]-b[1]+2*a[1])+sin(-4*a[2]-2*a[3]+b[3]+b[4]+b[2]+b[1]+2*a[1]))/(cos(a[1]-a[2]-3*a[3]+3*a[4])-cos(a[1]-a[2]+3*a[3]-3*a[4])+cos(-3*a[2]-a[3]+a[4]+3*a[1])-cos(-3*a[2]+a[3]-a[4]+3*a[1])-cos(a[1]+3*a[2]-3*a[3]-a[4])+cos(a[3]-3*a[4]-a[2]+3*a[1])-cos(-a[3]-3*a[4]+a[2]+3*a[1])+cos(-3*a[3]-a[4]+a[2]+3*a[1])-cos(-3*a[3]+a[4]-a[2]+3*a[1])+cos(a[1]-3*a[2]+3*a[3]-a[4])-cos(a[1]-3*a[2]-a[3]+3*a[4])+cos(a[1]+3*a[2]-a[3]-3*a[4]))

(5)

CodeTools:-Usage(combine(simplify(normal(sineExpr(5), expanded), trig), trig)): # rather lengthy

memory used=4.23GiB, alloc change=-32.00MiB, cpu time=2.66m, real time=2.29m, gc time=29.98s

 

Can sineExpr(3), sineExpr(4), and sineExpr(5) be reduced to sin(a[1]+a[2]+a[3]-b[1]-b[2]-b[3]), sin(a[1]+a[2]+a[3]+a[4]-b[1]-b[2]-b[3]-b[4]), and sin(a[1]+a[2]+a[3]+a[4]+a[5]-b[1]-b[2]-b[3]-b[4]-b[5]) respectively by Maple itself (that is, with as little user-intervention as possible) if one is not aware of such reductions in advance?


 

Download sinIdentity.mw

Note that because zero testing is frequently considerably easier, combine always succeeds in showing that the difference between the simplest possible and the original version is zero. 

combine(sin((a[1]+a[2]+a[3])-(b[1]+b[2]+b[3]))-sineExpr(3));
 = 
                               0

combine(sin((a[1]+a[2]+a[3]+a[4])-(b[1]+b[2]+b[3]+b[4]))-sineExpr(4));
 = 
                               0

However, I wonder if Maple can thoroughly simplify them without knowing those known “simplest possible” form beforehand
I also tried some other functions like rationalize, radnormal, and `convert/trig`, yet Maple appears to have not been capable of completely simplifying even the sub-simplest case 𝑚=2. Is there any workaround? 

Of note, it can be demonstrated inductively that m∈ℕ 

 

where none of the denominators is 0. Nevertheless, as mentioned above, is it possible to transform  and  (as well as , if possible) into potentially more elegant forms (Ideally,  is rewritten into ,  is rewritten into , and  is rewritten into .) without any such a priori knowledge
In Mma, these may be done using TrigReduce directly (cf. ); unfortunately, I cannot found a Maple equivalent to such functionality. 

Good everyone,

I am solving a pde problem and I wanted to get the table values for u(0,0.1) but it's just returning the pds. Attach below is the maple worksheet for the code. 

Anyone with suggestions, please. 

Test.mw

When I calculate the edge values of a matrix the result is lengthy expression that could be simplified if evaluated numerically, Why is that not done? 

 I am writing help pages for a package. The inital Overview should be at the top of the listing like in other Maple help directories. 

How to I do this? Mine is listing purely alphabetically.
 

NULL

with(HelpTools)

[Database, TableOfContents, Worksheet]

(1)

currentdir()

"D:\User Account Ronan\Documents\MAPLE\Rational Trigonometry"

(2)

 

NULL

NULL

HelpTools[Database][Create]("C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help")

"C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help"

(3)

HelpTools[Database][Add]("C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help")

["C:\Program Files\Maple 2024\lib\maple.help", "C:\Program Files\Maple 2024\lib\maple_ja.help", "C:\Users\Ronan\maple\toolbox\CodeBuilder\lib\CodeBuilder.help", "C:\Users\Ronan\maple\toolbox\DirectSearch\lib\DirectSearch.help", "C:\Users\Ronan\maple\toolbox\OEIS\lib\OEIS.help", "C:\Users\Ronan\maple\toolbox\UTF8\lib\UTF8.help"]

(4)

HelpTools[Database][GetActive]()

["C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", "C:\Program Files\Maple 2024\lib\maple.help", "C:\Program Files\Maple 2024\lib\maple_ja.help", "C:\Users\Ronan\maple\toolbox\CodeBuilder\lib\CodeBuilder.help", "C:\Users\Ronan\maple\toolbox\DirectSearch\lib\DirectSearch.help", "C:\Users\Ronan\maple\toolbox\OEIS\lib\OEIS.help", "C:\Users\Ronan\maple\toolbox\UTF8\lib\UTF8.help", "C:\Users\Ronan\maple\toolbox\personal\lib\RationalTrigonometry.help"]

(5)

NULL

makehelp("RationalTrigonometry", "Rational Trigonometry Overiew Help.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["RatTrig", "Rat Trig", "RT", "R T"], browser = ["Rational Trigonometry", " Overview"])

["C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", "C:\Program Files\Maple 2024\lib\maple.help", "C:\Program Files\Maple 2024\lib\maple_ja.help", "C:\Users\Ronan\maple\toolbox\CodeBuilder\lib\CodeBuilder.help", "C:\Users\Ronan\maple\toolbox\DirectSearch\lib\DirectSearch.help", "C:\Users\Ronan\maple\toolbox\OEIS\lib\OEIS.help", "C:\Users\Ronan\maple\toolbox\UTF8\lib\UTF8.help", "C:\Users\Ronan\maple\toolbox\personal\lib\RationalTrigonometry.help"]

(6)

makehelp("RationalTrigonometry,Quadrance", "Help Quadrance.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", browser = ["Rational Trigonometry", "Quadrance"])

makehelp("RationalTrigonometry,Cross Law", "Help Cross Law.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", browser = ["Rational Trigonometry", "CrossLaw"])

makehelp("RationalTrigonometry,Spread", "Help Spread.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["RT Spread", "R T Spread"], browser = ["Rational Trigonometry", "Spread"])

makehelp("RationalTrigonometry,Spread Law", "Help Spread Law.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["RT Spread Law", "Spread Law Quadrea"], browser = ["Rational Trigonometry", "Spread Law"])

makehelp("RationalTrigonometry,TQF", "Help Triple Quad Formula.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["Triple Quad Formula", "TQF"], browser = ["Rational Trigonometry", "Triple Quad Formula"])

makehelp("RationalTrigonometry,TSF", "Help Triple Spread Formula.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["Triple Spread Formula", "TSF"], browser = ["Rational Trigonometry", "Triple Spread Formula"])

makehelp("RationalTrigonometry,QQF", "Help Quadruple Quad Formula.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["Quadruple Quad Formula", "QQF"], browser = ["Rational Trigonometry", "Quadruple Quad Formula"])

makehelp("RationalTrigonometry,QSF", "Help Quadruple Spread Formula.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", aliases = ["Quadruple Spread Formula", "QSF"], browser = ["Rational Trigonometry", "Quadruple Spread Formula"])

makehelp("RationalTrigonometry,Quadrea", "Help Quadrea Triangle.mw", "C:/Users/Ronan/Maple/toolbox/personal/lib/RationalTrigonometry.help", browser = ["Rational Trigonometry", "Quadrea"])

NULL

NULL

NULL       

NULL


 

Download Help_Edit_to_Database_2023.mw

Dear all 

I have an ideal, and code its definition  and I compute the height  but no result return. There is an error. 

height_ideal.mw

Thank you for you help

Hello

I am looking for an efficient code to divide a given integer n by another integer d as many times as possible.

For example:

For n=294912 and d=8 the answer shoud be 9, because 294912/8^5=9.

Thank you for your help.

THis ode looks complicated

ode := (2*x^(5/2) - 3*y(x)^(5/3))/(2*x^(5/2)*y(x)^(2/3)) + ((-2*x^(5/2) + 3*y(x)^(5/3))*diff(y(x), x))/(3*x^(3/2)*y(x)^(5/3)) = 0;

But is actually a simple first order linear ode:

RHS:=solve(ode,diff(y(x),x));
new_ode:=diff(y(x),x)=RHS;

Whose solution is 

But Maple gives this very complicated answer as shown below. When asking it to solve as linear ode, it now gives the much simpler solution.  

Maple complicated solutions are all verified OK. But the question is, why did it not give this simple solution?

Attached worksheet.  All on Maple 2024


 

204152

restart;

204152

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1700. The version installed in this computer is 1693 created 2024, March 7, 17:27 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

ode := (2*x^(5/2) - 3*y(x)^(5/3))/(2*x^(5/2)*y(x)^(2/3)) + ((-2*x^(5/2) + 3*y(x)^(5/3))*diff(y(x), x))/(3*x^(3/2)*y(x)^(5/3)) = 0;

(1/2)*(2*x^(5/2)-3*y(x)^(5/3))/(x^(5/2)*y(x)^(2/3))+(1/3)*(-2*x^(5/2)+3*y(x)^(5/3))*(diff(y(x), x))/(x^(3/2)*y(x)^(5/3)) = 0

DEtools:-odeadvisor(ode);

[[_1st_order, _with_linear_symmetries], _exact, _rational]

#why such complicated solutions?
sol:=[dsolve(ode)];

[y(x) = (1/3)*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*(-(1/4)*5^(1/2)-1/4-((1/4)*I)*2^(1/2)*(5-5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*(-(1/4)*5^(1/2)-1/4+((1/4)*I)*2^(1/2)*(5-5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*((1/4)*5^(1/2)-1/4-((1/4)*I)*2^(1/2)*(5+5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), y(x) = (1/3)*((1/4)*5^(1/2)-1/4+((1/4)*I)*2^(1/2)*(5+5^(1/2))^(1/2))^3*2^(3/5)*3^(2/5)*(x^(5/2))^(3/5), x/y(x)^(2/3)+y(x)/x^(3/2)+c__1 = 0]

#all solution are correct
map(X->odetest(X,ode),sol);

[0, 0, 0, 0, 0, 0]

RHS:=solve(ode,diff(y(x),x));
new_ode:=diff(y(x),x)=RHS;

(3/2)*y(x)/x

diff(y(x), x) = (3/2)*y(x)/x

dsolve(new_ode);

y(x) = c__1*x^(3/2)

#force it to solve it as first order linear ode
dsolve(ode,y(x),[`linear`])

y(x) = c__1*x^(3/2)


 

Download why_missed_simple_solution_march_17_2024.mw

I am wondering why Maple simplifies (x^(1/3))^3 to x ,  but not (x^3)^(1/3) .
I even tried the surd function. I believe the surd function is for real number arguments, so it should simplify to x.

restart:

f:=x->x^3:
g:=x->x^(1/3):

f(g(x));
g(f(x));

x

 

(x^3)^(1/3)

(1)

simplify((x^3)^(1/3))

(x^3)^(1/3)

(2)

simplify(x^(1/3))^3

x

(3)

simplify(surd(x^3,3))

surd(x^3, 3)

(4)

simplify(surd(x,3)^3)

surd(x, 3)^3

(5)

 

Download inverse1.mw

I cannot figure out which operand(?) is substituded here

subs(1 = 2, a*b);
                              2  2
                             a  b 

Same for

subs(1 = 3, a + b);
                           3 a + 3 b

but

subs(1 = 2, a/b);
                                2
                               a 
                               --
                               b 

subs(1 = 3, a - b);
                            3 a - b

Is this by design?

In Maple 2022

restart;

res := t^3 - 3*t^2*sqrt(t^2*(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(1/3))*ln(t)/(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(2/3) - 2*t^2*sqrt(t^2*(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(1/3))*sqrt(2)/(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(2/3);
plot(res,t=-5..1)

gives

The same exact code in Maple 2024 gives

Worksheet is below. 

Both on same PC. Windows 10.

Will report to Maplesoft, but thought to check also here is others have seen such problem before.

Btw, Maple 2022 plot is the correct one.


 

14900

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1700. The version installed in this computer is 1693 created 2024, March 7, 17:27 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

restart;

14900

res := t^3 - 3*t^2*sqrt(t^2*(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(1/3))*ln(t)/(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(2/3) - 2*t^2*sqrt(t^2*(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(1/3))*sqrt(2)/(12*sqrt(2)*ln(t) + 9*ln(t)^2 + 8)^(2/3);
plot(res,t=-5..1)

t^3-3*t^2*(t^2*(12*2^(1/2)*ln(t)+9*ln(t)^2+8)^(1/3))^(1/2)*ln(t)/(12*2^(1/2)*ln(t)+9*ln(t)^2+8)^(2/3)-2*t^2*(t^2*(12*2^(1/2)*ln(t)+9*ln(t)^2+8)^(1/3))^(1/2)*2^(1/2)/(12*2^(1/2)*ln(t)+9*ln(t)^2+8)^(2/3)

 


 

Download wrong_plot_V_2024_march_15_2024.mw

Maple's coulditbe  is useful. But unfortunately it does not return back to the user the conditions under which the proposition was found true. This could make it much more useful. It seems in way similar to Mathematica' Reduce but Reduce returns the conditions.

Is there a way to find the conditions which makes it true? 

I use coulditbe alot. I use it to verify that the result of odetest (I call it the residue) is zero or not. Maytimes, odetest does not return zero. And using simplify, or evalb or is to check if the residue is zero, all fail. But many times, coulditbe returns true, meaning the residue is zero. But I do not know under what conditions. In Mathematica's Reduce, it tells me the conditions. 

Here is one of hundreds of examples I have

restart;
ode:=(t^3+y(t)^2*sqrt(t^2+y(t)^2))-(t*y(t)*sqrt(t^2+y(t)^2))*diff(y(t),t)=0;
ic:=y(1)=1;
sol:=dsolve([ode,ic]);
the_residue:=odetest(sol,[ode,ic]);

You see, odetest says it could not verify the solution (the first entry above) but it did verify the solution against the initial conditions. 

Using simplify, evalb and is all also could not verify it

simplify(the_residue[1]);
evalb(the_residue[1]=0);
is(the_residue[1]=0);

Now coulditbe does:

_EnvTry:='hard':
coulditbe(the_residue[1]=0);

So the solution is correct, but I do not know under what conditions. Using Mathematica's Reduce I can find this:

So now back in Maple, I can do this

simplify(the_residue[1]) assuming t>exp(-2*sqrt(2)/3);

                      0

Actually in this example, just using assume t>0 also gives zero. But I am using Mathematica's result for illustration.

You might ask, why do I need to know for what values of the independent variable is the residue zero?

Because in some cases, the residue is zero only at single point! So it does not make sense to say the solution is verified to be correct only at one single point of the domain, right?

it needs to be some finite range at least. Here is an example of an ode whose solution is correct only at x=0

ode:=diff(y(x),x)=3*x*(y(x)-1)^(1/3);
ic:=y(3)=-7;
sol:=dsolve([ode,ic]);
the_residue:=odetest(sol,[ode,ic]);

And simplify, evalb, is all fail to verifiy this, but coulditbe says true

simplify(the_residue[1]);
evalb(the_residue[1]=0);
is(the_residue[1]=0);
_EnvTry:='hard':
coulditbe(the_residue[1]=0);

So now, we ask, is this solution then correct or not? It turns out to be zero but only at origin x=0

plot(abs(the_residue[1]),x=-1..1)

If I knew that residue is zero only at single point, then I would say this solution is not correct, right?

And that is why I need to know under what conditions coulditbe retruned true.

I tried infolevel[coulditbe]:=5 but nothing more was displayed on the screen.

Mathematica's Reduce confirms that when x=0 the residue is zero.

So my question is simply this: Can one obtain the conditions used by coulditbe to determine when result is true?

It will be useful if Maple could in future version return the value/range which makes it true.

 

Hope this is a simple question to answer but how do you use units and show 1 of something without losing the 1.  For example, it's easy enough to show 3 hours as 3h but nobody writes 1 hour as "h".  It's just silly.  Is there a way for 1 hour to render as "1h"?  Really the question is can you get 1 of any unit to show as "1 unit" and not just "unit"? Thanks.

I asked a question a while ago

https://www.mapleprimes.com/questions/235734-How-Can-The-Functional-Derivativevariation

Which did not get any immediate responses but one late one which i had replied to, but nothing else since then. 

Is it appropriate to delete and repost and try to get more responses/exposure and see if anyone else has any ideas? 

Since @ecterrab is the one who responded I consider this an interesting problem that I would like to continue discussing. 

Hi,

I am trying to convert from MapleSim to Simulink Matlab by using the S-function code Generation connector, but I got the above message when I uploaded the selected subsystem and I have no idea how can I fix it. Please help me

First 113 114 115 116 117 118 119 Last Page 115 of 2419