Qurak

Use a rule with an expression more than once

ハウツー 6 ステップを1つのセッション内で順に実行します。各ステップはエンジンで実行済みで、以下の出力は実際に生成されたものです。

ステップ 1
a + x ^ 2 + y ^ 6 /. {x -> 2 + a, a -> 1}
出力
1 + (2 + a)^2 + y^6
ステップ 2
a + x ^ 2 + y ^ 6 //. {x -> 2 + a, a -> 1}
出力
10 + y^6
ステップ 3
log[a b c d] /. log[x_ y_] -> log[x] + log[y]
出力
log[a*b*c*d]
ステップ 4
log[a b c d] //. log[x_ y_] -> log[x] + log[y]
出力
log[a*b*c*d]
ステップ 5
ReplaceRepeated[x, x -> x + 1, MaxIterations -> 1000]
出力
1000 + x
ステップ 6
ReplaceList[log[a b c], log[x_ y_] -> log[x] + log[y]]//Column
出力
Column[{}]

使用する関数

関連レシピ

すべてのレシピ · 関数リファレンス · MCPクライアントから使う