Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Mathematica Substitution' topicStudent Support Forum > General > "Mathematica Substitution"

Next Comment >Help | Reply To Topic
Author Comment/Response
Charles
12/12/07 6:19pm

Hi,

I have a mathematica question. It is bugging me allot. I am just doing some simple algebra in Mathematica:

In[1]:= q[r_] := qo*(1 - r/a)

In[2]:= wH[r_] := c1*r^2*Log[r] + c2*Log[r] + c3*r^2 + c4;

In[3]:= wP[r_] := (q[r]*r^4)/(64*K);

In[4]:= w[r_] := wP[r] + wH[r]

In[5]:= w[r]

Out[5]= c4 + c3 r^2 + (qo r^4 (1 - r/a))/(64 K) + c2 Log[r] +
c1 r^2 Log[r]

In[6]:= c1 = 0;

In[7]:= c2 = 0;

In[8]:= w[r]

Out[8]= c4 + c3 r^2 + (qo r^4 (1 - r/a))/(64 K)

In[9]:= A[r_] := D[w[r], {r, 1}]

In[10]:= A[r]

(This is correct, it too the differential of w[r] correct!)

Out[10]= 2 c3 r - (qo r^4)/(64 a K) + (qo r^3 (1 - r/a))/(16 K)

But when I plug in for r=a, it doesn't give me the right answer!

In[15]:= A[a]

Out[15]= 2 a c3

A[r=a] should not equal 2*a*c3? What is Mathematica doing

A[r=a] should equal = 2*a*c3-(qo*a^3)/(64*K)!!!!

Please help. I'm in desperate need. A big Hug for all those help me!

Thanks.


URL: ,

Subject (listing for 'Mathematica Substitution')
Author Date Posted
Mathematica Substitution Charles 12/12/07 6:19pm
Re: Mathematica Substitution yehuda ben-s... 12/16/07 07:23am
Next Comment >Help | Reply To Topic