|
|
Newsgroups: comp.soft-sys.matlab, comp.soft-sys.math.maple, sci.math.symbolic
From: dev...@math.udel.edu
Date: 31 Aug 2005 23:02:58 -0700
Local: Thurs, Sep 1 2005 2:02 am
Subject: Re: Improving the MATLAB function "simple"
JohnCreight...@hotmail.com wrote: Yes, but the prudent use of redundant assumptions can be very useful. > dev...@math.udel.edu wrote: > > As I've tried to show you in other posts, the way to get better > > simplifications is to get the simplifying routines to make better use > > of the assumptions, and a good way to do this is to simplify the > > assumptions and break them down into cases. Using redundant > > assumptions can work well. (What we are calling "assumptions" are more > > often called "constraints".) > Redundant assumptions can slow a program down so much it will never There has much research on this in the past few years. Look up "redundant modeling" and "constraint propagation". In the case of the example that you used to start this thread (shown far below), we already saw that 'combine' quickly handles the assumptions in the multiplied together form, whereas 'simplify' will only do anything useful with the assumption factored into cases. By making the assumptions redundantly in both forms, both simplify and combine would be to do something useful with the expression. > Also breaking down expressions means you are doing more work and the I meant that you would achieve better results by **writing a program** > computer is doing less. that breaks down the assumptions than you would by applying the various simplifiers in sucession as you described. Here is a program that processes assumptions in this manner. First, an > restart; 3 3 (1/3) > expr:= (x^3*y^3)^(1/3); expr := (x y ) Suppose that we want to simplify the above radical expression under the > simplify(expr, radical) assuming x::real, y::real, x*y>0; 3 3 (1/3) (x y ) But in high school algebra we learn that inequalities of products can > simplify(expr, radical) assuming x>0, y>0; x y > simplify(expr, radical) assuming x<0, y<0; x y Since both simplifications are the same, we can say that the answer is Maple's 'assuming' facility cannot handle multivariate disjunctive > simplify(expr, radical) assuming x<0 and y<0 or x>0 and y>0; Error, (in assuming) when calling 'assume/ProcessTerm'. Received: 'x < 0 and y < 0 or 0 < x and 0 < y is an invalid property' With a little thought, we can see that the only way to process such a AssumeFactorableInequality:= proc(expr::uneval, Ineq::{`<`, `<=`}) # If the inequality cannot be factored, # Factor out constants and check sign of their product. # If there's only one nonconstant factor, # For every even subset of the factors (counting the product of the # For every pair of evaluations, check if the evaluated forms are # If we get here, then the table Simps has at least two evaluated Now back to the first example. > AssumeFactorableInequality(simplify(expr, radical), x*y > 0); x y If the disjuncts yield distinct simplifications, then a piecewise form > AssumeFactorableInequality(simplify((x^4*y^3)^(1/2), radical), x*y > 0); { 2 1/2 { -I x y (-y) x < 0 and y < 0 { { 2 (3/2) { x y 0 < x and 0 < y Now let's do the example that started this thread. > p:=-(Ps1_1*Ppa1_1+Ps_ps1_1^2)/Ppa1_1: 1 > d:= 1/(sqrt(p)*sqrt(1/p)): > AssumeFactorableInequality(simplify(d, radical), p>0); You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.matlab, comp.soft-sys.math.maple, sci.math.symbolic
From: JohnCreight...@hotmail.com
Date: 2 Sep 2005 15:06:37 -0700
Local: Fri, Sep 2 2005 6:06 pm
Subject: Re: Improving the MATLAB function "simple"
I am impressed by you code and you technique does seem to solve my
problem. I have hover started my own post about an alternative method. I feel the alternative method will be more general and powerful. However, this could just be from a lack of understanding I have about how your method works. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: "smango" <sm...@rumms.uni-mannheim.de>
Date: 2 Sep 2005 03:40:42 -0700
Local: Fri, Sep 2 2005 6:40 am
Subject: plotting changed implicitplot3d data
Hi there,
I want to evaluate a function for points on the unit sphere. I read an s:=implicitplot3d(x^2+y^2+z^2-1=0, x=-1..1, y=-1..1, z=-1..1, I changed the points in the resulting array. But how do I plot the results? I don't even know how to lot s without Please help me, Smango You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: Preben Alsholm <P.K.Alsh...@mat.dtu.dk>
Date: Fri, 02 Sep 2005 13:29:58 +0200
Local: Fri, Sep 2 2005 7:29 am
Subject: Re: plotting changed implicitplot3d data
smango wrote: That should be really simple. Just enter s on an input line an press ENTER: > s:=implicitplot3d(x^2+y^2+z^2-1=0, x=-1..1, y=-1..1, z=-1..1, > numpoints=4000); > I changed the points in the resulting array. > But how do I plot the results? I don't even know how to lot s without > with(plots): > s:=implicitplot3d(x^2+y^2+z^2-1=0, x=-1..1, y=-1..1, z=-1..1, > numpoints=4000): > s; Preben Alsholm You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: "smango" <sm...@rumms.uni-mannheim.de>
Date: 2 Sep 2005 05:14:48 -0700
Local: Fri, Sep 2 2005 8:14 am
Subject: Re: plotting changed implicitplot3d data
Thank you!
Now I have a new problem. The evaluation does not seem to work correctly. Does anybody have a suggestion on how to generate the points on a sphere and lateron plot them in 3D? Smango You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: dev...@math.udel.edu
Date: 2 Sep 2005 10:35:14 -0700
Local: Fri, Sep 2 2005 1:35 pm
Subject: Re: plotting changed implicitplot3d data
smango wrote: Since you started by mentioning implicitplot3d, I'll describe how this > Does anybody have a suggestion on how to generate the points on a > sphere and lateron plot them in 3D? is done. Of the various methods of plotting a surface, implicit is the one which will always work; but it gives the lowest quality plot (still, not bad), and requires the generation and memory storage of a huge amount of extraneous data. We represent the surface as a function of 3 (not 2) variables, f:= (x,y,z)-> x^2+y^2+z^2-1: We need to evaluate this function over a 3D grid of points. Let's say N:= 8000: It is not necessary to use the same number for each dimension. We need a **four**-dimensional array to hold the data: Pts:= Array(1..n, 1..n, 1..n, 1..4, datatype= float[8]): The last dimension is always 1..4. We'll see why in a moment. An We need ranges for x, y, and z. In the example, let's make the range xlo,xhi:= op(-1.2 .. 1.2): So we have a rectangular block of 3D space, in this case [-1.2 .. for i to n do for j to n do for k to n do To plot it: PLOT3D(ISOSURFACE(Pts)); To further manipulate the plot, save it in a variable Myplot:= %: and use plots[display] to make feature changes: plots[display](Myplot, title= "My plot", axes= boxed); There are three numeric data structures that are used to represent You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: isr...@math.ubc.ca (Robert Israel)
Date: 2 Sep 2005 23:32:47 GMT
Local: Fri, Sep 2 2005 7:32 pm
Subject: Re: plotting changed implicitplot3d data
In article <1125682514.342598.299...@g43g2000cwa.googlegroups.com>,
<dev...@math.udel.edu> wrote: ... >smango wrote: >> Does anybody have a suggestion on how to generate the points on a >> sphere and lateron plot them in 3D? >Since you started by mentioning implicitplot3d, I'll describe how this >is done. Of the various methods of plotting a surface, implicit is the >one which will always work; but it gives the lowest quality plot >(still, not bad), and requires the generation and memory storage of a >huge amount of extraneous data. ... and the point is that the ISOSURFACE data structure doesn't contain To create a data structure that does contain points on a sphere, you seq(seq([x0 + r*cos(2*j*Pi/m)*sin(2*k*Pi/n), where m and n are positive integers (for a sphere of radius r centred Robert Israel isr...@math.ubc.ca You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: "smango" <sm...@rumms.uni-mannheim.de>
Date: 8 Sep 2005 02:02:05 -0700
Local: Thurs, Sep 8 2005 5:02 am
Subject: Re: plotting changed implicitplot3d data
Thanks for your tip, I tried that, but how do I plot these points. I
tried to plot (with listplot3d) a sphere from the sequence but the result looks more like a wavy ocean. Is there a way for Maple to sort the points by itsef? Regards, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: isr...@math.ubc.ca (Robert Israel)
Date: 8 Sep 2005 18:36:12 GMT
Local: Thurs, Sep 8 2005 2:36 pm
Subject: Re: plotting changed implicitplot3d data
In article <1126170125.483578.171...@g43g2000cwa.googlegroups.com>,
smango <sm...@rumms.uni-mannheim.de> wrote: Try pointplot3d to plot the points as points. If you want a >Thanks for your tip, I tried that, but how do I plot these points. I >tried to plot (with listplot3d) a sphere from the sequence but the >result looks more like a wavy ocean. Is there a way for Maple to sort >the points by itsef? surface, you'll have to organize them in a list of lists of points or an Array of points. Robert Israel isr...@math.ubc.ca You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: comp.soft-sys.math.maple
From: "Paminu" <as...@asd.com>
Date: Fri, 2 Sep 2005 14:08:42 +0200
Local: Fri, Sep 2 2005 8:08 am
Subject: Double underline in maple?
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2010 Google |