File size: 17,027 Bytes
5c920e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
export const mockCalculusUnit = {
    unitId: "calc-u1",
    unitTitle: "Limits & Derivatives",
    nodes: [
        {
            id: "calc-n1",
            title: "Concept of Limits",
            description: "Classify scenarios where limits exist or fail.",
            type: "concept",
            status: "available",
            stages: [
                {
                    stageId: "calc-s1",
                    topic: "Limit Existence",
                    module: "Instruction",
                    component: "TaxonomyMatrix",
                    skin: "Code",
                    config: {
                        data: {
                            buckets: ["Limit Exists", "Limit Does Not Exist"],
                            items: [
                                { id: "limit1", content: "Left limit = 5, Right = 5" },
                                { id: "limit2", content: "Left limit = 3, Right = -3 (Jump)" },
                                { id: "limit3", content: "Approaches infinity (Asymptote)" },
                                { id: "limit4", content: "Continuous polynomial" }
                            ]
                        },
                        initialState: { assignments: {} }
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { 
                        success: "Excellent classification! Limits require agreement from both sides.", 
                        error: "Check the definitions of jumps and asymptotes.",
                        hint: "If left and right don't match, it doesn't exist."
                    }
                }
            ]
        },
        {
            id: "calc-n2",
            title: "Derivative Rules",
            description: "Match base functions to their derivatives.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s2",
                    topic: "Basic Differentiation",
                    module: "Practice",
                    component: "PatternMatcher",
                    skin: "Scientific",
                    config: {
                        data: {
                            pairs: [
                                { id: "diff1", left: "f(x) = x³", right: "f'(x) = 3x²" },
                                { id: "diff2", left: "f(x) = sin(x)", right: "f'(x) = cos(x)" },
                                { id: "diff3", left: "f(x) = eˣ", right: "f'(x) = eˣ" },
                                { id: "diff4", left: "f(x) = ln(x)", right: "f'(x) = 1/x" }
                            ]
                        },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { 
                        success: "All matched! You master the basic power and transcendental rules.", 
                        error: "Review your trig and exponential derivatives.",
                        hint: "The derivative of eˣ is special!"
                    }
                }
            ]
        },
        {
            id: "calc-n3",
            title: "Squeeze Theorem",
            description: "Apply the squeeze theorem to find limits.",
            type: "concept",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s3",
                    topic: "Squeeze Theorem Application",
                    module: "Instruction",
                    component: "LogicChain",
                    skin: "Code",
                    config: {
                        data: { nodes: ["Find lower bound g(x)", "Find upper bound h(x)", "Show g(x) ≤ f(x) ≤ h(x)", "Evaluate lim g(x) = lim h(x)", "Conclude lim f(x)"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Perfect squeeze theorem steps!", error: "Review the theorem conditions.", hint: "Both bounds must converge to the same value." }
                }
            ]
        },
        {
            id: "calc-n4",
            title: "Continuity",
            description: "Determine where functions are continuous.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s4",
                    topic: "Continuity Conditions",
                    module: "Practice",
                    component: "TaxonomyMatrix",
                    skin: "Code",
                    config: {
                        data: {
                            buckets: ["Continuous", "Discontinuous"],
                            items: [
                                { id: "cont1", content: "f(a) is defined, lim = f(a)" },
                                { id: "cont2", content: "Jump at x = 2" },
                                { id: "cont3", content: "Removable hole at x = 0" },
                                { id: "cont4", content: "Polynomial on all reals" }
                            ]
                        },
                        initialState: { assignments: {} }
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Great continuity analysis!", error: "Check the three conditions.", hint: "All three conditions must hold." }
                }
            ]
        },
        {
            id: "calc-n5",
            title: "Power Rule",
            description: "Master the power rule for differentiation.",
            type: "concept",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s5",
                    topic: "Power Rule Practice",
                    module: "Instruction",
                    component: "LogicChain",
                    skin: "Code",
                    config: {
                        data: { nodes: ["f(x) = xⁿ", "Bring down exponent", "Multiply by coefficient", "Reduce exponent by 1", "f'(x) = nxⁿ⁻¹"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Power rule mastered!", error: "Review the power rule steps.", hint: "d/dx[xⁿ] = nxⁿ⁻¹" }
                }
            ]
        },
        {
            id: "calc-n6",
            title: "Product Rule",
            description: "Apply the product rule to differentiate.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s6",
                    topic: "Product Rule",
                    module: "Practice",
                    component: "LogicChain",
                    skin: "Scientific",
                    config: {
                        data: { nodes: ["Identify u and v", "Find u'", "Find v'", "Apply u'v + uv'", "Simplify"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Product rule applied correctly!", error: "Remember: (uv)' = u'v + uv'", hint: "Don't forget both terms." }
                }
            ]
        },
        {
            id: "calc-n7",
            title: "Quotient Rule",
            description: "Differentiate rational functions.",
            type: "concept",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s7",
                    topic: "Quotient Rule",
                    module: "Instruction",
                    component: "LogicChain",
                    skin: "Code",
                    config: {
                        data: { nodes: ["Identify numerator u", "Identify denominator v", "Compute u'v - uv'", "Divide by v²", "Simplify"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Quotient rule nailed!", error: "Review: (u/v)' = (u'v - uv')/v²", hint: "Lo dHi minus Hi dLo over Lo Lo." }
                }
            ]
        },
        {
            id: "calc-n8",
            title: "Chain Rule",
            description: "Differentiate composite functions.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s8",
                    topic: "Chain Rule",
                    module: "Practice",
                    component: "LogicChain",
                    skin: "Scientific",
                    config: {
                        data: { nodes: ["Identify outer function f", "Identify inner function g", "Differentiate f'(g(x))", "Multiply by g'(x)", "Final answer"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Chain rule mastered!", error: "Don't forget the inner derivative!", hint: "d/dx[f(g(x))] = f'(g(x))·g'(x)" }
                }
            ]
        },
        {
            id: "calc-n9",
            title: "Implicit Differentiation",
            description: "Differentiate implicitly defined functions.",
            type: "concept",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s9",
                    topic: "Implicit Differentiation Steps",
                    module: "Instruction",
                    component: "LogicChain",
                    skin: "Code",
                    config: {
                        data: { nodes: ["Differentiate both sides", "Apply chain rule to y terms", "Collect dy/dx terms", "Factor out dy/dx", "Solve for dy/dx"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Implicit differentiation complete!", error: "Remember to treat y as a function of x.", hint: "Every y term needs dy/dx." }
                }
            ]
        },
        {
            id: "calc-n10",
            title: "Related Rates",
            description: "Solve related rates problems.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s10",
                    topic: "Related Rates Strategy",
                    module: "Practice",
                    component: "LogicChain",
                    skin: "Scientific",
                    config: {
                        data: { nodes: ["Draw diagram", "Write equation relating variables", "Differentiate with respect to t", "Substitute known values", "Solve for unknown rate"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Related rates solved!", error: "Make sure to differentiate with respect to time.", hint: "Everything changes with time." }
                }
            ]
        },
        {
            id: "calc-n11",
            title: "Trig Derivatives",
            description: "Differentiate trigonometric functions.",
            type: "concept",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s11",
                    topic: "Trig Function Derivatives",
                    module: "Instruction",
                    component: "TaxonomyMatrix",
                    skin: "Code",
                    config: {
                        data: {
                            buckets: ["Positive Cosine Family", "Negative Sine Family"],
                            items: [
                                { id: "trig1", content: "d/dx[sin x] = cos x" },
                                { id: "trig2", content: "d/dx[cos x] = -sin x" },
                                { id: "trig3", content: "d/dx[tan x] = sec²x" },
                                { id: "trig4", content: "d/dx[cot x] = -csc²x" }
                            ]
                        },
                        initialState: { assignments: {} }
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Trig derivatives classified!", error: "Review co-function patterns.", hint: "Co-functions have negative derivatives." }
                }
            ]
        },
        {
            id: "calc-n12",
            title: "Higher-Order Derivatives",
            description: "Compute second and third derivatives.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s12",
                    topic: "Higher-Order Derivatives",
                    module: "Practice",
                    component: "LogicChain",
                    skin: "Code",
                    config: {
                        data: { nodes: ["f(x)", "f'(x) — First derivative", "f''(x) — Second derivative", "f'''(x) — Third derivative"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Higher-order derivatives done!", error: "Just keep differentiating!", hint: "Differentiate the previous result." }
                }
            ]
        },
        {
            id: "calc-n13",
            title: "L'Hôpital's Rule",
            description: "Evaluate indeterminate limits.",
            type: "concept",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s13",
                    topic: "L'Hôpital's Rule",
                    module: "Instruction",
                    component: "LogicChain",
                    skin: "Scientific",
                    config: {
                        data: { nodes: ["Check 0/0 or ∞/∞ form", "Differentiate numerator", "Differentiate denominator", "Re-evaluate limit", "Repeat if needed"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "L'Hôpital's applied correctly!", error: "Only works for indeterminate forms.", hint: "Must be 0/0 or ∞/∞ first." }
                }
            ]
        },
        {
            id: "calc-n14",
            title: "Mean Value Theorem",
            description: "Understand and apply MVT.",
            type: "exercise",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s14",
                    topic: "MVT Application",
                    module: "Practice",
                    component: "LogicChain",
                    skin: "Code",
                    config: {
                        data: { nodes: ["Verify continuity on [a,b]", "Verify differentiability on (a,b)", "Compute [f(b)-f(a)]/(b-a)", "Set f'(c) equal to slope", "Solve for c"] },
                        initialState: {}
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "MVT applied perfectly!", error: "Check the theorem conditions.", hint: "There exists a c where the tangent equals the secant." }
                }
            ]
        },
        {
            id: "calc-n15",
            title: "Final Challenge",
            description: "Comprehensive limits & derivatives assessment.",
            type: "challenge",
            status: "locked",
            stages: [
                {
                    stageId: "calc-s15",
                    topic: "Comprehensive Review",
                    module: "Assessment",
                    component: "TaxonomyMatrix",
                    skin: "Code",
                    config: {
                        data: {
                            buckets: ["Differentiation Technique", "Limit Technique"],
                            items: [
                                { id: "final1", content: "Chain Rule" },
                                { id: "final2", content: "L'Hôpital's Rule" },
                                { id: "final3", content: "Product Rule" },
                                { id: "final4", content: "Squeeze Theorem" }
                            ]
                        },
                        initialState: { assignments: {} }
                    },
                    validation: { type: "exact", condition: {} },
                    feedback: { success: "Congratulations! Calculus mastered!", error: "Review the course material.", hint: "Classify each technique by its primary use." }
                }
            ]
        }
    ]
};