Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'findroot problem' topicStudent Support Forum > General > Archives > "findroot problem"

Next Comment >Help | Reply To Topic
Author Comment/Response
04/22/05 07:29am

I'm new to mathematica and have been using it to solve differential
equations. Today i did a simple equation and managed to plot it (plot
looked correct) but when i tried (and tried and tried...) to use
Findroot to find the root i keep getting error messages. This is my
work (without the plot):

mc = 1;
mp = 0.01;
l1 = 0.1;
l2 = 0.4;
g = 9.81;

d = (mc l1 - mp l2)*g/(mc l1^2 + mp l2^2)


simpletreb = NDSolve[{ϕ''[
t] == -d Sin[ϕ[t]], ϕ[0] == (3π/4), ϕ'[0] == 0},
ϕ[t], {t, 0, 1}]

{{ϕ[t] -> InterpolatingFunction[{{0., 1.}}, <>][t]}}

{{ϕ[t] -> InterpolatingFunction[{{0.`, 1.`}}, "<>"][t]}}

Plot[ϕ[t] /. simpletreb, {t, 0, 0.5}];


FindRoot[ϕ[t] == 0, {t,0.2}]
Findroot::nlnum :
The function value (ϕ[0.2]} is not a list of numbers with
dimensions {1} at {t} = {0.2}

note: the "ϕ" is a symbol that won't show up here.
Also attached is a screenshot of what i've done.
I tried many things all of which came up with various errors. From the
plot i know the root is between 0.25 and 0.3. If anyone can point me
in right direction id greatly appreciate it!

Attachment: findroot problem.JPG, URL: ,

Subject (listing for 'findroot problem')
Author Date Posted
findroot problem bruce 04/22/05 07:29am
Re: findroot problem yehuda ben-s... 04/25/05 01:43am
Next Comment >Help | Reply To Topic