janhardo

1007 Reputation

13 Badges

12 years, 108 days
B. Ed math

MaplePrimes Activity


These are questions asked by janhardo

I must do some formula manipulation
 

Classification of conic sections

> 

restart; with(student):

> 

A*x^2+B*y^2+C*x+D*y+E=0;

A*x^2+B*y^2+C*x+D*y+E = 0

(1)
> 

f:= A*x^2+B*y^2+C*x+D*y+E;

A*x^2+B*y^2+C*x+D*y+E

(2)
> 

completesquare(f, x);

A*(x+(1/2)*C/A)^2-(1/4)*C^2/A+B*y^2+D*y+E

(3)
> 

f:= A*x^2+B*y^2+C*x+D*y+E;

A*x^2+B*y^2+C*x+D*y+E

(4)
> 

ans:=Student[Precalculus][CompleteSquare]( (4), [y] );

B*(y+(1/2)*D/B)^2+A*x^2+C*x+E-(1/4)*D^2/B

(5)
> 

ans1:=Student[Precalculus][CompleteSquare]( (4), [x] );

A*(x+(1/2)*C/A)^2-(1/4)*C^2/A+B*y^2+D*y+E

(6)
> 

ans+ans1;

B*(y+(1/2)*D/B)^2+A*x^2+C*x+2*E-(1/4)*D^2/B+A*(x+(1/2)*C/A)^2-(1/4)*C^2/A+B*y^2+D*y

(7)
> 

B*(y + D/(2*B))^2 + A*x^2 + C*x + 2*E - D^2/(4*B) + A*(x + C/(2*A))^2 - C^2/(4*A) + B*y^2 + D*y = 0;

B*(y+(1/2)*D/B)^2+A*x^2+C*x+2*E-(1/4)*D^2/B+A*(x+(1/2)*C/A)^2-(1/4)*C^2/A+B*y^2+D*y = 0

(8)

Now i must  get this form A( )^2 +B( )^2 = M  

> 

 


 

Download vraag_herleiding_conic_sections_formule.mw

 

 

I like to show a domain as a roster of gridlines
The plotbuilder has not this option gridlines , so i must program this ?

A complicated programmed task for me
I must analyze this 

In this plot there are vertical  walls connected with the step area's , but that its not wanted.
Also the domain is showed by adding 0 in the plot 3d( {0, 'g(x,y)'}, ...) and this distract the plot with the step area's
Its not needed the domain in the plot ( in order to get the 0 value for z )     

The 3 axis x,y,z  are not visible in the plot 
Seems to be not complete programmed as it just to be.


 

> 

restart

> 

 

> 

f:=proc(A,B,T,x,y)

> 

     local n,m,i,j,val;

> 

     n:=nops(A);m:=nops(B);

> 

       for i from 1 to n-1 do

> 

         for j from 1 to m-1 do

> 

         if (A[i]<=x and x<A[i+1]) and

> 

            (B[j]<=y and y< B[j+1]) then val:=T[i,j];

> 

         end if;

> 

          end do;

> 

       end do;

> 

     val;

> 

   end proc:

> 

 

> 

 

> 

A:=[0,1,2];B:=[0,1,2];T:=array([[1,2],[1.5,1]]);

A := [0, 1, 2]

 

B := [0, 1, 2]

 

array( 1 .. 2, 1 .. 2, [( 2, 1 ) = (1.5), ( 1, 1 ) = (1), ( 2, 2 ) = (1), ( 1, 2 ) = (2)  ] )

(1)
> 

 

> 

g:=(x,y)->f(A,B,T,x,y);

proc (x, y) options operator, arrow; f(A, B, T, x, y) end proc

(2)
> 

 

> 

plot3d({0,'g(x,y)'},x=0..2,y=0..2,axes=normal,
           scaling=constrained,orientation=[-37,75],
           projection=0.8,tickmarks=[3,0,2],
           shading=XYZ,lightmodel='light3');

 
> 

 


 

Download texc_set_4_-task_3_-forumvraag.mw

 

With showstat( )  i can see procedure body 
But it is also possible for tools : assistant, math apps, tutors and tasks ?

In library all proc are public.

Should be that i was thinking on the use the arrow operator for a function definition and to use this for graphing this function
It becomes complicated.


 

> 

restart;

> 

 

the following piecewise-defined function was considered

exc set 4 task 1a
                                                                                

> 

sin(3*x): # x <= 0 .. must be evaluated to true or false for branching to      #other second function
sin(x/3): # otherwise

> 

h:=proc(x)
   if x<=0 then sin(3*x)
   else sin(x/3)
   fi;
end proc:

> 

maplemint(h);

> 

h(1); #

sin(1/3)

(1)
> 

h(1.0);

.3271946968

(2)

Strange that this function notation e.g h(1) can be used for a expression ?, while the idea was to use this only for a function defintion with a arrow operator  ( function as a procedure )
Seems to be possible to use the notation e.g : h(1) or h(1.0) if the input parameter is numeric for a expression.

 

The condition in the if statement must be(can only) evaluated numeric..that seems to be not possible with the arrow operator definition in the procedure.

 

> 

h(x);

Error, (in h) cannot determine if this expression is true or false: x <= 0

 
> 

plot('h(x)'); # delay of the evaluation of h(x)

 
> 

plot(h);

 
> 

 


 

Download exc_set_4_task1.mw

 

First 16 17 18 19 20 21 22 Page 18 of 23