Message Boards Message Boards

0
|
3922 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to define an implicit function please ?

Posted 4 years ago

Hello, I am new with Mathematica.

I want to define a fonction

cem[mr_] := ro[te,mr] / (Norm[ro[te,mr]]^3)

but the parameter te is calculating by means of

te == tr - Norm[ro[te,mr]]

and it doesn't work. Could you know how to calculate cem[mr_] with an implicite calculus of te please ?

Here is the code :

me[t_] := {t*(1 - Erf[t]) - 1/(Sqrt[Pi]*E^t^2), 0, 0}
mr := {x, y, z}

ro[te_, mr_] := mr - me[te]

z  = 0;
tr = -5;

(*
Clear[ten]; RecurrenceTable[{ten[n+1] == N[tr-Norm[ro[ten[n], mr]],100], ten[0] == tr}, ten, {n, 0, 12}]
Clear[tel];                  tel[ten_]:= N[tr-Norm[ro[ten   , mr]],100]; te = NestList[tel,tr,12][[13]]
*)

te == tr - Norm[ro[te, mr]];

cem[mr_] := ro[te, mr]/(Norm[ro[te, mr]]^3)

StreamPlot[cem[mr], {x, -3, 3}, {y, -3, 3}]

Thank you.

Armen SARIAN

POSTED BY: Armen SARIAN
2 Replies

== is a relational operator. It doesn't define anything.

I think you want to use the delayed assignment (:=) instead. It's not just to define functions, after all.

POSTED BY: Lucien Grondin
Posted 4 years ago

Thank you.

I have tried this :

Block[{$RecursionLimit=20}, te[tr_,mr_] := tr-Norm[ro[te[tr, mr], mr]]];
te[-5,{-1,-1,0}]

It is written :

$RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of -(Norm[ro[te[-5,{-1,-1,0}],{-1,-1,0}]])

.

Hold[-5 - Norm[ro[te[-5, {-1, -1, 0}], {-1, -1, 0}]]]

I can't find a numerical value.

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract