acer

32333 Reputation

29 Badges

19 years, 321 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

What have you been able to accomplish for this course-work question, so far?

@C_R I believe that the OP is asking how to programmatically obtain something as simple as his f__4, given the input p.

His question ends with, "Is there a way to get the much simplified result programmatically?" The instance of the definite pronoun "the" indicates "the much simplified result" as being a reference to the already obtained f__4. He's asked how to programmatically compute his superior f__4, not how to further improve it from what he's already obtained manually.

@jalal I don't see how you could easily programmatically and automatically connect up an arbitrary Grading:-Quiz embedded assembly with additional Components. The only ways I can think of (so far) involve more effort than basic re-implementation.

Part of the problem is that when you call Grading:-Quiz you don't know what will be the names/identities of the components that it will embed. So accessing, say, the MathContainer's randomly generated Limit example is trickier. It could likely be done by using a special global in the example-generating proc.

Another part of the problem is that Grading:-Quiz doesn't optionally return the raw XML that will embedded. So merging that with additional XML components (so as to get the whole, augmented assembly to be automatically embedded together) would be effort.

These are part of the rationale for thinking that it'd be easier to just reimplement this basic kind of Grading:-Quiz functionality, in your own mechanism that builds it all together.

@jalal Ok, so you need two Buttons, a MathContainer, and a TextArea. You can embed those from the palette. How far have you gotten with writing the action code behind the Buttons?

What are your actual requirements for connecting this to Grading:-Quiz, if at all?

Please add your close followup queries here, instead of spawning wholly separate Question threads that closely duplicate the topic.

@jalal I don't know what are your actual requirements, in detail. I find it difficult to make good concrete suggestions without concrete requirements.

For a simple project, you could hook up a few commands from Student:-Calculus1 as actions behind Buttons, and send the results into MathContainers or TextAreas. Eg, ShowSolution and Hint. But I don't know how exactly you want it all laid out, or connected to grading.

For that kind of project my own preference would be to not use Grading:-Quiz. Instead, I'd be more inclined to write my own variant of that (from scratch), which also had extra Buttons/Containers for the extras like ShowSolution/Hint.

How would a hint be used? If used, then would it produce successive hints?

And I think I start prototyping it using a fixed, preconstructed set of embedded components that I laid out manually in a Table. Only after getting the inter-operation of the components Actions working properly would I move on to writing code that generated and embedded the whole assembly programmatically.

ps. Somewhere (in the vault...) I suspect I might have a prototype of the LimitTutor that produces and works in embedded components. I know I have one for IntTutor. It's time-consuming to make it all work, together. Not hard, but time consuming. Alas I don't currently have time to finish those and make them as good as I'd like it.

You should be able to provide the steps to reproduce what you obtain when you run it in the debugger.

As it stands, you haven't even shown us how you invoked the debugger for that run, let alone whatever computations might have preceded that entry.

Do any of the relevant names have assumptions on them? Are they globals or locals? Those are just queries. You can produce code and steps to reproduce, because that's what you're using.

@C_R If I open your latest attachment (Maple 2023.0) and (without re-executing any other part), run at its end the single command,
  alias()
then I get NULL as its output.

I wonder whether you might have an initialization file that's getting run.

@delvin Axel did not include attachments.

Instead, he was making a comment about your attachments.

The file you attached above named 01.mw was last saved using Maple 2023.0.

The file you attached above named 02.mw was last saved using Maple 2022.0.

I believe that Axel was pointing out that they were last saved using different versions of Maple.

If you're going to paste several images of homework questions at near the same time (did you just get an assignment?) then please add them all to the same Question thread.

Please put your follow queries for this here, instead of spawning a wholly separate, duplicate Question thread.

I have submitted a bug report about this.

The behavior doesn't match what code you've shown.

You haven't assigned anything to U, in the code shown.

I suggest that you upload and attach your worksheet, using the green up-arrow in the Mapleprimes editor.

ps. I changed your Post into a Question.

@minhthien2016 For your followup example you can also get the answer using the geom3d package, which can compute the exact result.

Below I do that by manually splitting the region into two tetrahedrons.

You can compare that with floating-point results.

restart;

with(PolyhedralSets): with(geom3d):

 

L:=[[1/2,1/2,0],[-1/2,1/2,0],[-1/2,-1/2,0],
    [-1/4,1/4,sqrt(15)/4],[1/4,-1/4,sqrt(15)/4]]:

 

point('A',L[1][]),point('B',L[2][]),point('C',L[3][]),
point('E',L[4][]),point('F',L[5][]):

gtetrahedron('T1',[A,C,E,F]),gtetrahedron('T2',[A,B,C,E]):

volume(T1) + volume(T2);

(1/12)*15^(1/2)

evalf(%);

.3227486122

ps := PolyhedralSet(convert(evalf[15](L),rational,':-exact'),
                    [x,y,z]):

evalf(PolyhedralSets:-Volume(ps));

.3227486122

evalf(ComputationalGeometry:-ConvexHull(L,'output'=':-volume'));

.3227486122

Plot(ps);

draw([T1,T2],'axes'=':-boxed',labels=[x,y,z]);

Download 3dpolyhed_vol.mw

@DEE_Engineering In your first followup worksheet (attached file "more_testing_in_workbook.mw") you have suppressed the t in x(t).

And so in that worksheet the input that looks like s(x) is actually s(x(t)). That is, the input that looks like s(x) does in fact depend upon t.

But you have done no such suppression for theta or varphi. So s(theta) is just s(theta) and doesn't depend upon t. Similarly c(varphi) is just c(varphi) and doesn't depend upon t. So when you differentiate either of those two things (or their product) with respect to the name t the result is zero.

diff(s(theta)*c(varphi), t);

         0

Of course, when you did it (in the previous line) like,
   diff(s(theta(t))*c(varphi(t)), t)
you got the expected result.

As for your second followup query I cannot tell because the 2nd attachment (named "more_testing_in_doc.mw") doesn't look like what you showed inlined above.

First 71 72 73 74 75 76 77 Last Page 73 of 591