Message Boards Message Boards

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

Loop solving an equation?

Posted 3 years ago

I want to solve for the variable sigma for all values of Np. Please Help

ClearAll["Gloabal`*"];
Np = {2100, 4900, 26600, 21000};
a0 = 10^-6;
af = 12 10^-6;
c = 3.41 10^-11;
m = 2.43;
f = (1 + 3 a0/af)/((2 \[Sqrt](Pi a0/af)) (1 - (a0/af))^(3/2));
Do[Solve[(a0^(-m/2 + 1) - af^(-m/2 + 1))/((m/2 - 1) c f^m \[Sigma]^
m Pi^(m/2)) == Np[[i]], \[Sigma]], {i, 1, 4, 1}]
POSTED BY: KRISHAN SHARMA
2 Replies

Try:

 ClearAll["`*"];
 Np = {2100, 4900, 26600, 21000};
 a0 = 10^-6; af = 12 10^-6; c = 3.41 10^-11; m = 2.43;
 f = (1 + 3 a0/af)/((2 \[Sqrt](Pi a0/af)) (1 - (a0/af))^(3/2));
 Table[NSolve[(a0^(-m/2 + 1) - 
 af^(-m/2 + 1))/((m/2 - 1) c f^m \[Sigma]^m Pi^(m/2)) == 
     Np[[i]], \[Sigma], Reals][[1]], {i, 1, 4, 1}]

  (*{{\[Sigma] -> 1570.76}, {\[Sigma] -> 1108.35}, {\[Sigma] -> 552.508}, {\[Sigma] -> 608.956}}*)
POSTED BY: Mariusz Iwaniuk
Posted 3 years ago

Thanks! It worked

POSTED BY: KRISHAN SHARMA
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