Skip to content

Commit b715179

Browse files
authored
Merge pull request #374 from ut-code/add-answer-for-mathjs
Add answer for `mathjs`
2 parents 13bb537 + e98b633 commit b715179

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/3-web-servers/03-module/index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,15 @@ console.log(format(new Date(), "yyyy年MM月dd日"));
247247

248248
1. サンプルコードの dateFns 変数の中身をデバッガで観察してみましょう。
249249
2. [`mathjs` パッケージ](https://www.npmjs.com/package/mathjs)は、JavaScript で複雑な計算を行うためのライブラリです。このライブラリを用いて、$\log(x)$ を $x$ について微分した式を求めてください。
250+
<Answer>
250251

251-
<ViewSource url={import.meta.url} path="_samples/math-js" noCodeSandbox />
252+
[`mathjs.derivative` 関数](https://mathjs.org/docs/reference/functions/derivative.html)を用いると、微分した式を求めることができます。
253+
254+
```javascript
255+
import { derivative } from "mathjs";
256+
console.log(derivative("log(x, e)", "x").toString());
257+
```
258+
259+
<ViewSource url={import.meta.url} path="_samples/math-js" noCodeSandbox />
260+
261+
</Answer>

0 commit comments

Comments
 (0)