nm

11353 Reputation

20 Badges

13 years, 13 days

MaplePrimes Activity


These are replies submitted by nm

@Carl Love 

yes, great answer as usual. I've been busy and now got to try it and it works very well. thanks.

 

could these be build-into Maple, as an extra option to plot command, called 'plot_theme' or such? 

Mathematica has this option, they call it `PlotTheme` https://reference.wolfram.com/language/ref/PlotTheme.html  and one can select many themes. 

It will be good to have such functionality as part of Maple's plot command as well.

@Carl Love 

May be we are using different Maple versions?
 

restart;

interface(version)

`Standard Worksheet Interface, Maple 2020.1, Windows 10, June 10 2020 Build ID 1474787`

my_sol:=y(x) = arctan(x - _C1)*x - arctan(x - _C1)*_C1 - ln(1 + (x - _C1)^2)/2;

y(x) = -arctan(-x+_C1)*x+arctan(-x+_C1)*_C1-(1/2)*ln(1+(x-_C1)^2)

simplify(my_sol)

y(x) = -(1/2)*ln(_C1^2-2*_C1*x+x^2+1)+(1/2)*(-2*x+2*_C1)*arctan(-x+_C1)

 


 

Download check_3.mw

@ecterrab 

Thank you very much for this nice hint. I had no idea one could do this in Maple. This is very useful and I will use it more now.

I think this ODE comes from the book "Ordinary differential equations and their solutions. By George Moseley Murphy. 1960". 

Actually the solution I got, before simplifying it is very close to Maple's

 

I used Maple to help with integration and simplification of expressions during solving it.

thanks again. Attached PDF if needed.

 

foo3.pdf

 

@vv 

opps, sorry about that. I was not trying to confuse any one. I confused myself, since I copied the data into a Matrix() and did not notice that <<|>> notation and Matrix([]) do not geneate the same matrix, but the transpose of it. That is why.

Thanks for pointing that out. 

I do not like to use << | >> notation in Maple, and prefer to use Matrix( [] ), that is all.

 

@rameen hamood 

are you sure you copied it right? it says

let A=<< 87, -66, -90, 12, 48>|<-36, -40, -82, -54, 15>|<99, 79, 76, -31, 27>|<-69, 15, -10, 45, -9>>

and x= <9,-4,2,-17>.

But A is 4 by 5, and x is (if you look at it as column vector) is 4 by 1. So inner dimensions do not match. Even if you look at x as row vector, it is 1 by 4, and inner dimensions do not match either.

But if you view x as matrix, then x.A works, like this

 

restart;
A:=Matrix([ [87, -66, -90, 12, 48],[-36, -40, -82, -54, 15],[99, 79, 76, -31, 27],[-69, 15, -10, 45, -9]]);
x:=Matrix([9,-4,2,-17]);
TA:=x.A

which gives

         [2298, -531, -160, -503, 579]

Do not know if this is what being asked.

 

 

is what you asking how to multiply a matrix by a vector in Maple?

@Kitonum 

would you know why Maple choose in this example to give the solution the way it did, instead of the normal way, which would be 

                      y(x)=arccos(ln(x)+1)*x, y(x)=-arccos(ln(x)+1)*x 

i.e. a sequence of 2 solutions.

I find it very strange, why out of a sudden Maple choose this new new way to write out the solution. I find it confusing way to write out the solutions, given that Maple typically writes out solutions in clear way.

 

 

@vv 

I really understand what you are saying, I guess this is a philosophical question in a way.

Just as I view C=A/B the same as -A+C*B=0 just written differently, So I viewed   dy/dx=A/B the same as  -A dx+ B dy=0 just written differently and now it is exact, but if one views it as -A/B dx + dy=0 it is not exact.

So it depends how it is written.

But I ended up checking for both cases now. If the first form fails test for exact, then I try the second form of the ODE. So I am all set.

But I do get your point. It would hard for Maple to check different forms each time to find out.

 

 

 

@vv 

I can't enter Latex here. Here is screen shot

It is the same ODE, just written differently?  You are viewing moving the denominator to the other side as multiplication by integration factor? I did not look at it this way. I just viewed it as same ODE just written different.

 

@ecterrab 

thanks. I remember now running into this some time ago. The problem is that odetest worked using C[1] in my solutions may be for 99.99% of the time and only very rarely it failed. That is why I thought I did not need to change my code to use _C1 instead of C[1]. 

I do not use Maple's own solutions in odetest, but my own solutions. 

But it is resolved now. I simply changed my code to use _C1 and _C2 instead. I was first worried about using _C1 since I read that user code is not supposed to use variables with _ in front of them, due to possible conflict with Maple's own internal variables.

Issue is solved. Sorry if this caused any problems.

 

@AHSAN 

this is not what you wrote in your original question. In addition, I no longer understand what you are writing. In (22) you say diff(p(x),x) and in (23) you write diff(p(y),y)=0.  

Are these pde's and not ode's? I'll let someone else try to help you, as I am not able to understand your problem. good luck.

@lcz 

Instead of 

subs((5435 + 3*sqrt(515793))^(1/3)=t,s1)

You could try

simplify(subs((5435 + 3*sqrt(515793))=t^3,s1))

@Carl Love 

The solve evaluates to NULL

But I checked before. On 2020.1 

solve(x^2+a=0,x) assuming a>0

But I do not understand exactly what you mean by "Arguments are evaluated before being passed"

If solve is evaluated before being passed to timelimit, then what is the point of using timelimit in first place?

The whole reason to use timelimit is to prevent solve evaluation  from taking a long time? I must be missing something about what you are saying here.

But now I always add [ ] around solve inside timelimit. This has fixed things.

@Carl Love 

Thanks for your nice code example. It was useful to learn from.

But I was worried that if Maple introduce D(x),D(y),D(z), etc... as build-in operators, then many problems will start to result from users abusing this. For example, when I called your function using

ode:= -(x^2+x*y(x))*(D(x))^2 + D(y(x)) = 0:
convert(ode, standardODE);

ode:= -(x^2+x*y(x))*ln(D(x)) + D(y(x)) = 0;
convert(ode, standardODE);

I can come up with 1000 more such examples.

Ofcourse you could argue that the input should mathematically make sense to start with, but that is my point. Users can now type anything and abuse this notation to the limit and then expect Maple to figure what they meant.

Maple would have to do 100 times more work to parse the input to check it represents a valid differential equation since the D(x) and D(y) have been separated apart and they can be anywhere and inside anything. For example, What if there is an extra D(y) with no matching D(x), what does that mean mathematically?

If the purpose for the user wanting this notation, is to enter a differential equation, then they should simply use diff(y(x),x) standard notation. If the purpose is for something else, the OP did not explain why they needed this notation for. 

I just do not see the benefit gained from this complexity. I do not know of any CAS that supports such operations. May be there is a good reason why that is. 

 

First 54 55 56 57 58 59 60 Last Page 56 of 91