Group Abstract Group Abstract

Message Boards Message Boards

Define and solve formula syntax problem

Posted 3 years ago
POSTED BY: Karl S
7 Replies

I am getting no errors:

Kramer[Z_, \[Lambda]_, T_, x_] := 
  108*10^-4*Z*
   Log[Konst[\[Lambda]]]/((T/100)^(3/
         2)*\[Lambda]^2)*((electrondensity[x, Z, 
        Avog])/(electrondensitycrit[\[Lambda]]))^2;
Integrate[Kramer[Z, \[Lambda], T, x], x]
POSTED BY: Gianluca Gorni
Posted 3 years ago
Kramer[Z_, \[Lambda]_, T_, x_] := 
      108*10^-4*Z*
       Log[Konst[\[Lambda]]]/((T/100)^(3/
             2)*\[Lambda]^2)*((electrondensity[x, Z, 
            Avog])/(electrondensitycrit[\[Lambda]]))^2;
    Plot[Integrate[Kramer[12, 10.6, 30, x], x], {x, 0, 40}]

I get

SetDelayed::write: Tag Times in (5.20617*10^-6 [Lambda]^2 Log[6.57374*10^25 [Lambda]] Z)[Z,[Lambda],T,x_] is Protected.

and the plot is empty

POSTED BY: Karl S
POSTED BY: Gianluca Gorni
Posted 3 years ago

Probably because of preexisting conflicting definitions. Quit the kernel and start over.

Integrate[Kramer[12, 10.6, 30, x], x]
(* -((7.42291*10^-42 Avog^2 (50.0099 + Log[T]))/x^5) *)

Avog and T do not have numeric values so a Plot cannot be generated.

POSTED BY: Rohit Namjoshi

Also, beware of the expression 4*T/100 *\[Lambda]*2 \[Pi].

Mathematica reads it as 4*(T/100) *\[Lambda]*2 \[Pi], which may not be what you have in mind.

POSTED BY: Gianluca Gorni
POSTED BY: Gianluca Gorni
Posted 3 years ago

Ok this works for me also now.

electrondensity[x_, Z_, Avog_] := (7*Avog*Z)/(118) * (1/x)^3
electrondensitycrit[\[Lambda]_] := 1.1 10^21/\[Lambda]^2
Konst[\[Lambda]_] := 
 4*T/(100 *\[Lambda]*2 \[Pi])/(0.577*6.626*10^-34 *3*10^8)

I want to integrate the following formula for x:

Kramer[Z_, \[Lambda]_, T_, x_] := 
 108*10^-4 *Z * 
  Log[Konst[\[Lambda]]]/((T/100)^(3/
        2)*\[Lambda]^2 ) *((electrondensity[
       x])/(electrondensitycrit[\[Lambda]]))^2

However, with defining this equation, the error:

SetDelayed::write: Tag Times in (5.20617*10^-6 [Lambda]^2 Log[6.57374*10^25 [Lambda]] Z)[Z,[Lambda],T,x_] is Protected.

occurs with the output: $Failed

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