@@ -7,7 +7,7 @@ This section provides practical examples of using MathFlow in different scenario
77### Simple Calculations
88
99``` ts:line-numbers
10- import { createContext } from 'mathflow';
10+ import { createContext } from '@mathflowjs/ mathflow';
1111
1212const ctx = createContext();
1313
@@ -23,7 +23,7 @@ console.log(ctx.solve('sqrt(16)')); // 4
2323### Working with Variables
2424
2525``` ts:line-numbers
26- import { createContext } from 'mathflow';
26+ import { createContext } from '@mathflowjs/ mathflow';
2727
2828const ctx = createContext({
2929 variables: {
@@ -46,7 +46,7 @@ console.log(ctx.solve('x + y + z')); // 18
4646### Solving Equations in Steps
4747
4848``` ts:line-numbers
49- import { createContext } from 'mathflow';
49+ import { createContext } from '@mathflowjs/ mathflow';
5050
5151const steps = ctx.solveBatch(`
5252 x = 5
@@ -65,7 +65,7 @@ steps.forEach(step => {
6565### Working with Functions
6666
6767``` ts:line-numbers
68- import { createContext } from 'mathflow';
68+ import { createContext } from '@mathflowjs/ mathflow';
6969
7070const ctx = createContext({
7171 functions: {
@@ -83,7 +83,7 @@ console.log(ctx.solve('circleArea(5)')); // 78.54...
8383### Trigonometry
8484
8585``` ts:line-numbers
86- import { createContext } from 'mathflow';
86+ import { createContext } from '@mathflowjs/ mathflow';
8787
8888const ctx = createContext({
8989 preferences: {
@@ -103,7 +103,7 @@ console.log(ctx.solve('sin(x)^2 + cos(x)^2')); // 1
103103### LaTeX Output
104104
105105``` ts:line-numbers
106- import { createContext } from 'mathflow';
106+ import { createContext } from '@mathflowjs/ mathflow';
107107
108108const ctx = createContext();
109109
@@ -121,7 +121,7 @@ console.log(latex);
121121### HTML Rendering
122122
123123``` ts:line-numbers
124- import { createContext } from 'mathflow';
124+ import { createContext } from '@mathflowjs/ mathflow';
125125
126126const ctx = createContext();
127127
@@ -140,7 +140,7 @@ document.getElementById('math').innerHTML = html;
140140### Financial Calculations
141141
142142``` ts:line-numbers
143- import { createContext } from 'mathflow';
143+ import { createContext } from '@mathflowjs/ mathflow';
144144
145145const ctx = createContext({
146146 functions: {
@@ -164,7 +164,7 @@ console.log(ctx.solve('PMT(200000, 0.035, 360)')); // 898.09
164164### Physics Equations
165165
166166``` ts:line-numbers
167- import { createContext } from 'mathflow';
167+ import { createContext } from '@mathflowjs/ mathflow';
168168
169169const ctx = createContext({
170170 constants: {
@@ -189,7 +189,7 @@ console.log(ctx.solve('period(2)')); // 2.84s (2m length)
189189### Geometry
190190
191191``` ts:line-numbers
192- import { createContext } from 'mathflow';
192+ import { createContext } from '@mathflowjs/ mathflow';
193193
194194const ctx = createContext({
195195 functions: {
@@ -217,7 +217,7 @@ console.log(ctx.solve('polygonArea(6, 2)')); // 10.39
217217### Graceful Error Handling
218218
219219``` ts:line-numbers
220- import { createContext } from 'mathflow';
220+ import { createContext } from '@mathflowjs/ mathflow';
221221
222222function safeSolve(expr: string) {
223223 try {
@@ -244,7 +244,7 @@ console.log(safeSolve('undefined_var')); // { success: false, error: "RuntimeErr
244244### Input Validation
245245
246246``` ts:line-numbers
247- import { createContext } from 'mathflow';
247+ import { createContext } from '@mathflowjs/ mathflow';
248248
249249function validateExpression(expr: string) {
250250 const ctx = createContext();
0 commit comments